Skip to content
Ona Docs

Environments

CreateEnvironment
client.environments.create(EnvironmentCreateParams { name, sessionId, spec } body, RequestOptionsoptions?): EnvironmentCreateResponse { environment }
POST/gitpod.v1.EnvironmentService/CreateEnvironment
CreateEnvironmentAccessToken
client.environments.createEnvironmentToken(EnvironmentCreateEnvironmentTokenParams { environmentId } body, RequestOptionsoptions?): EnvironmentCreateEnvironmentTokenResponse { accessToken }
POST/gitpod.v1.EnvironmentService/CreateEnvironmentAccessToken
CreateEnvironmentFromProject
client.environments.createFromProject(EnvironmentCreateFromProjectParams { name, projectId, sessionId, spec } body, RequestOptionsoptions?): EnvironmentCreateFromProjectResponse { environment }
POST/gitpod.v1.EnvironmentService/CreateEnvironmentFromProject
CreateEnvironmentLogsToken
client.environments.createLogsToken(EnvironmentCreateLogsTokenParams { environmentId } body, RequestOptionsoptions?): EnvironmentCreateLogsTokenResponse { accessToken }
POST/gitpod.v1.EnvironmentService/CreateEnvironmentLogsToken
DeleteEnvironment
client.environments.delete(EnvironmentDeleteParams { environmentId, force } body, RequestOptionsoptions?): EnvironmentDeleteResponse
POST/gitpod.v1.EnvironmentService/DeleteEnvironment
ListEnvironments
client.environments.list(EnvironmentListParams { token, pageSize, filter, pagination } params, RequestOptionsoptions?): EnvironmentsPage<Environment { id, metadata, spec, status } >
POST/gitpod.v1.EnvironmentService/ListEnvironments
MarkEnvironmentActive
client.environments.markActive(EnvironmentMarkActiveParams { activitySignal, environmentId } body, RequestOptionsoptions?): EnvironmentMarkActiveResponse
POST/gitpod.v1.EnvironmentService/MarkEnvironmentActive
GetEnvironment
client.environments.retrieve(EnvironmentRetrieveParams { environmentId } body, RequestOptionsoptions?): EnvironmentRetrieveResponse { environment }
POST/gitpod.v1.EnvironmentService/GetEnvironment
StartEnvironment
client.environments.start(EnvironmentStartParams { environmentId } body, RequestOptionsoptions?): EnvironmentStartResponse
POST/gitpod.v1.EnvironmentService/StartEnvironment
StopEnvironment
client.environments.stop(EnvironmentStopParams { environmentId } body, RequestOptionsoptions?): EnvironmentStopResponse
POST/gitpod.v1.EnvironmentService/StopEnvironment
UnarchiveEnvironment
client.environments.unarchive(EnvironmentUnarchiveParams { environmentId } body, RequestOptionsoptions?): EnvironmentUnarchiveResponse
POST/gitpod.v1.EnvironmentService/UnarchiveEnvironment
UpdateEnvironment
client.environments.update(EnvironmentUpdateParams { environmentId, metadata, spec } body, RequestOptionsoptions?): EnvironmentUpdateResponse
POST/gitpod.v1.EnvironmentService/UpdateEnvironment
ModelsExpand Collapse
AdmissionLevel = "ADMISSION_LEVEL_UNSPECIFIED" | "ADMISSION_LEVEL_OWNER_ONLY" | "ADMISSION_LEVEL_EVERYONE" | 2 more

Admission level describes who can access an environment instance and its ports.

One of the following:
"ADMISSION_LEVEL_UNSPECIFIED"
"ADMISSION_LEVEL_OWNER_ONLY"
"ADMISSION_LEVEL_EVERYONE"
"ADMISSION_LEVEL_ORGANIZATION"
"ADMISSION_LEVEL_CREATOR_ONLY"
BpfDebugLevel = "BPF_DEBUG_LEVEL_UNSPECIFIED" | "BPF_DEBUG_LEVEL_INFO" | "BPF_DEBUG_LEVEL_VERBOSE"

BPFDebugLevel controls the verbosity of BPF trace_pipe output (bpf_printk). Applies to all BPF-based agents (veto exec, future agents).

One of the following:
"BPF_DEBUG_LEVEL_UNSPECIFIED"
"BPF_DEBUG_LEVEL_INFO"
"BPF_DEBUG_LEVEL_VERBOSE"
Environment { id, metadata, spec, status }

+resource get environment

id: string

ID is a unique identifier of this environment. No other environment with the same name must be managed by this environment manager

metadata?: EnvironmentMetadata { annotations, archivedAt, createdAt, 10 more }

Metadata is data associated with this environment that’s required for other parts of Gitpod to function

annotations?: Record<string, string>

annotations are key/value pairs that gets attached to the environment. +internal - not yet implemented

archivedAt?: string

Time when the Environment was archived. If not set, the environment is not archived.

formatdate-time
createdAt?: string

Time when the Environment was created.

formatdate-time
creator?: Subject { id, principal }

creator is the identity of the creator of the environment

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
lastStartedAt?: string

Time when the Environment was last started (i.e. CreateEnvironment or StartEnvironment were called).

formatdate-time
lockdownAt?: string

lockdown_at is the time at which the environment becomes locked down due to the organization’s maximum environment lifetime policy. Nil when no lifetime policy applies.

formatdate-time
name?: string

name is the name of the environment as specified by the user

maxLength80
organizationId?: string

organization_id is the ID of the organization that contains the environment

formatuuid
originalContextUrl?: string

original_context_url is the normalized URL from which the environment was created

prebuildId?: string | null

prebuild_id is the ID of the prebuild this environment was created from. Only set if the environment was created from a prebuild.

formatuuid
projectId?: string

If the Environment was started from a project, the project_id will reference the project.

role is the role of the environment

One of the following:
"ENVIRONMENT_ROLE_UNSPECIFIED"
"ENVIRONMENT_ROLE_DEFAULT"
"ENVIRONMENT_ROLE_PREBUILD"
"ENVIRONMENT_ROLE_WORKFLOW"
runnerId?: string

Runner is the ID of the runner that runs this environment.

spec?: EnvironmentSpec { admission, automationsFile, content, 10 more }

Spec is the configuration of the environment that’s required for the runner to start the environment

admission?: AdmissionLevel

admission controlls who can access the environment and its ports.

One of the following:
"ADMISSION_LEVEL_UNSPECIFIED"
"ADMISSION_LEVEL_OWNER_ONLY"
"ADMISSION_LEVEL_EVERYONE"
"ADMISSION_LEVEL_ORGANIZATION"
"ADMISSION_LEVEL_CREATOR_ONLY"
automationsFile?: AutomationsFile { automationsFilePath, session, triggerFilter }

automations_file is the automations file spec of the environment

automationsFilePath?: string

automations_file_path is the path to the automations file that is applied in the environment, relative to the repo root. path must not be absolute (start with a /):

this.matches('^$|^[^/].*')
session?: string
triggerFilter?: Array<AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more } >

trigger_filter specifies which automation triggers should execute. When set, only automations matching these triggers will run. If empty/unset, all triggers are evaluated normally.

beforeSnapshot?: boolean
manual?: boolean
postDevcontainerStart?: boolean
postEnvironmentStart?: boolean
postMachineStart?: boolean
prebuild?: boolean
content?: Content { gitEmail, gitUsername, initializer, session }

content is the content spec of the environment

gitEmail?: string

The Git email address

gitUsername?: string

The Git username

initializer?: EnvironmentInitializer { specs }

initializer configures how the environment is to be initialized

specs?: Array<Spec>
contextUrl?: ContextURL { url }
url?: string

url is the URL from which the environment is created

formaturi
git?: Git { checkoutLocation, cloneTarget, remoteUri, 2 more }
checkoutLocation?: string

a path relative to the environment root in which the code will be checked out to

cloneTarget?: string

the value for the clone target mode - use depends on the target mode

remoteUri?: string

remote_uri is the Git remote origin

targetMode?: "CLONE_TARGET_MODE_UNSPECIFIED" | "CLONE_TARGET_MODE_REMOTE_HEAD" | "CLONE_TARGET_MODE_REMOTE_COMMIT" | 3 more

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstreamRemoteUri?: string

upstream_Remote_uri is the fork upstream of a repository

session?: string
desiredPhase?: EnvironmentPhase

Phase is the desired phase of the environment

One of the following:
"ENVIRONMENT_PHASE_UNSPECIFIED"
"ENVIRONMENT_PHASE_CREATING"
"ENVIRONMENT_PHASE_STARTING"
"ENVIRONMENT_PHASE_RUNNING"
"ENVIRONMENT_PHASE_UPDATING"
"ENVIRONMENT_PHASE_STOPPING"
"ENVIRONMENT_PHASE_STOPPED"
"ENVIRONMENT_PHASE_DELETING"
"ENVIRONMENT_PHASE_DELETED"
devcontainer?: Devcontainer { defaultDevcontainerImage, devcontainerFilePath, dotfiles, 2 more }

devcontainer is the devcontainer spec of the environment

defaultDevcontainerImage?: string

default_devcontainer_image is the default image that is used to start the devcontainer if no devcontainer config file is found

devcontainerFilePath?: string

devcontainer_file_path is the path to the devcontainer file relative to the repo root path must not be absolute (start with a /):

this.matches('^$|^[^/].*')
dotfiles?: Dotfiles { repository }

Experimental: dotfiles is the dotfiles configuration of the devcontainer

repository: string

URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)

formaturi
lifecycleStage?: "LIFECYCLE_STAGE_UNSPECIFIED" | "LIFECYCLE_STAGE_FULL" | "LIFECYCLE_STAGE_PREBUILD"

lifecycle_stage controls which devcontainer lifecycle commands are executed. Defaults to FULL if not specified.

One of the following:
"LIFECYCLE_STAGE_UNSPECIFIED"
"LIFECYCLE_STAGE_FULL"
"LIFECYCLE_STAGE_PREBUILD"
session?: string
kernelControlsConfig?: KernelControlsConfig { veto }

kernel_controls_config configures kernel-level controls for this environment

veto?: Veto { exec }

veto controls blocking mechanisms

exec?: Exec { action, denylist, enabled }

exec controls executable blocking

action specifies what action kernel-level controls take on policy violations

One of the following:
"KERNEL_CONTROLS_ACTION_UNSPECIFIED"
"KERNEL_CONTROLS_ACTION_BLOCK"
"KERNEL_CONTROLS_ACTION_AUDIT"
denylist?: Array<string>

denylist is the list of executable paths or names to block

enabled?: boolean

enabled controls whether executable blocking is active

machine?: Machine { class, session }

machine is the machine spec of the environment

class?: string

Class denotes the class of the environment we ought to start

session?: string
ports?: Array<Port>

ports is the set of ports which ought to be exposed to your network

admission?: AdmissionLevel

policy of this port

One of the following:
"ADMISSION_LEVEL_UNSPECIFIED"
"ADMISSION_LEVEL_OWNER_ONLY"
"ADMISSION_LEVEL_EVERYONE"
"ADMISSION_LEVEL_ORGANIZATION"
"ADMISSION_LEVEL_CREATOR_ONLY"
name?: string

name of this port

maxLength100
minLength1
port?: number

port number

formatint32
maximum65535
minimum1024
protocol?: "PROTOCOL_UNSPECIFIED" | "PROTOCOL_HTTP" | "PROTOCOL_HTTPS"

protocol for communication (Gateway proxy → user environment service). this setting only affects the protocol used between Gateway and user environment services.

One of the following:
"PROTOCOL_UNSPECIFIED"
"PROTOCOL_HTTP"
"PROTOCOL_HTTPS"
secrets?: Array<Secret>

secrets are confidential data that is mounted into the environment

id?: string

id is the unique identifier of the secret.

apiOnly?: boolean

api_only indicates the secret is only available via API/CLI. These secrets are resolved but NOT automatically injected into services or devcontainers.

containerRegistryBasicAuthHost?: string

container_registry_basic_auth_host is the hostname of the container registry that supports basic auth

credentialProxy?: CredentialProxy { format, header, targetHosts }

credential_proxy configures transparent credential injection via the credential proxy. When set, the credential proxy intercepts HTTPS traffic to the target hosts and replaces the dummy secret value with the real value in the specified HTTP header. The real secret value is never exposed in the environment. This field is orthogonal to mount — a secret can be both mounted (e.g. as a git credential) and proxied at the same time.

format?: "FORMAT_UNSPECIFIED" | "FORMAT_PLAIN" | "FORMAT_BASE64"

format describes how the secret value is encoded. The proxy uses this to decode the value before injecting it into the header.

One of the following:
"FORMAT_UNSPECIFIED"
"FORMAT_PLAIN"
"FORMAT_BASE64"
header?: string

header is the HTTP header name to inject (e.g. “Authorization”).

targetHosts?: Array<string>

target_hosts lists the hostnames to intercept (for example “github.com” or “*.github.com”). Wildcards are subdomain-only and do not match the apex domain.

environmentVariable?: string
filePath?: string

file_path is the path inside the devcontainer where the secret is mounted

gitCredentialHost?: string
name?: string

name is the human readable description of the secret

scope?: "SCOPE_UNSPECIFIED" | "SCOPE_ORGANIZATION" | "SCOPE_PROJECT" | 3 more

scope indicates where this secret originated from. Used to filter secrets during build (only org and project secrets are injected).

One of the following:
"SCOPE_UNSPECIFIED"
"SCOPE_ORGANIZATION"
"SCOPE_PROJECT"
"SCOPE_USER"
"SCOPE_SERVICE_ACCOUNT"
"SCOPE_RUNNER"
session?: string

session indicated the current session of the secret. When the session does not change, secrets are not reloaded in the environment.

source?: string

source is the source of the secret, for now control-plane or runner

sourceRef?: string

source_ref into the source, in case of control-plane this is uuid of the secret

specVersion?: string

version of the spec. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.spec_version < b.spec_version then a was the spec before b.

sshPublicKeys?: Array<SSHPublicKey>

ssh_public_keys are the public keys used to ssh into the environment

id?: string

id is the unique identifier of the public key

value?: string

value is the actual public key in the public key file format

timeout?: Timeout { disconnected }

Timeout configures the environment timeout

disconnected?: string

inacitivity is the maximum time of disconnection before the environment is stopped or paused. Minimum duration is 30 minutes. Set to 0 to disable. value must be 0s (disabled) or at least 1800s (30 minutes):

this == duration('0s') || this >= duration('1800s')
formatregex
workflowActionId?: string | null

workflow_action_id is an optional reference to the workflow execution action that created this environment. Used for tracking and event correlation.

formatuuid
status?: EnvironmentStatus { activitySignal, automationsFile, content, 10 more }

Status is the current status of the environment

activitySignal?: EnvironmentActivitySignal { source, timestamp }

activity_signal is the last activity signal for the environment.

source?: string

source of the activity signal, such as “VS Code”, “SSH”, or “Automations”. It should be a human-readable string that describes the source of the activity signal.

maxLength80
minLength3
timestamp?: string

timestamp of when the activity was observed by the source. Only reported every 5 minutes. Zero value means no activity was observed.

formatdate-time
automationsFile?: AutomationsFile { automationsFilePath, automationsFilePresence, failureMessage, 3 more }

automations_file contains the status of the automations file.

automationsFilePath?: string

automations_file_path is the path to the automations file relative to the repo root.

automationsFilePresence?: "PRESENCE_UNSPECIFIED" | "PRESENCE_ABSENT" | "PRESENCE_DISCOVERED" | "PRESENCE_SPECIFIED"

automations_file_presence indicates how an automations file is present in the environment.

One of the following:
"PRESENCE_UNSPECIFIED"
"PRESENCE_ABSENT"
"PRESENCE_DISCOVERED"
"PRESENCE_SPECIFIED"
failureMessage?: string

failure_message contains the reason the automations file failed to be applied. This is only set if the phase is FAILED.

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the automations file.

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
session?: string

session is the automations file session that is currently applied in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when no triggers are defined in the automations file.

content?: Content { contentLocationInMachine, failureMessage, git, 3 more }

content contains the status of the environment content.

contentLocationInMachine?: string

content_location_in_machine is the location of the content in the machine

failureMessage?: string

failure_message contains the reason the content initialization failed.

git?: Git { branch, changedFiles, cloneUrl, 4 more }

git is the Git working copy status of the environment. Note: this is a best-effort field and more often than not will not be present. Its absence does not indicate the absence of a working copy.

branch?: string

branch is branch we’re currently on

changedFiles?: Array<ChangedFile>

changed_files is an array of changed files in the environment, possibly truncated

changeType?: "CHANGE_TYPE_UNSPECIFIED" | "CHANGE_TYPE_ADDED" | "CHANGE_TYPE_MODIFIED" | 5 more

ChangeType is the type of change that happened to the file

One of the following:
"CHANGE_TYPE_UNSPECIFIED"
"CHANGE_TYPE_ADDED"
"CHANGE_TYPE_MODIFIED"
"CHANGE_TYPE_DELETED"
"CHANGE_TYPE_RENAMED"
"CHANGE_TYPE_COPIED"
"CHANGE_TYPE_UPDATED_BUT_UNMERGED"
"CHANGE_TYPE_UNTRACKED"
oldPath?: string

old_path is the previous path of the file before a rename or copy. Only set when change_type is RENAMED or COPIED.

maxLength255
path?: string

path is the path of the file

maxLength255
cloneUrl?: string

clone_url is the repository url as you would pass it to “git clone”. Only HTTPS clone URLs are supported.

latestCommit?: string

latest_commit is the most recent commit on the current branch

totalChangedFiles?: number
formatint32
totalUnpushedCommits?: number

the total number of unpushed changes

formatint32
unpushedCommits?: Array<string>

unpushed_commits is an array of unpushed changes in the environment, possibly truncated

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the environment content

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
session?: string

session is the session that is currently active in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when the content is present but not in the expected state.

devcontainer?: Devcontainer { containerId, containerName, devcontainerconfigInSync, 9 more }

devcontainer contains the status of the devcontainer.

containerId?: string

container_id is the ID of the container.

containerName?: string

container_name is the name of the container that is used to connect to the devcontainer

devcontainerconfigInSync?: boolean

devcontainerconfig_in_sync indicates if the devcontainer is up to date w.r.t. the devcontainer config file.

devcontainerFilePath?: string

devcontainer_file_path is the path to the devcontainer file relative to the repo root

devcontainerFilePresence?: "PRESENCE_UNSPECIFIED" | "PRESENCE_GENERATED" | "PRESENCE_DISCOVERED" | "PRESENCE_SPECIFIED"

devcontainer_file_presence indicates how the devcontainer file is present in the repo.

One of the following:
"PRESENCE_UNSPECIFIED"
"PRESENCE_GENERATED"
"PRESENCE_DISCOVERED"
"PRESENCE_SPECIFIED"
failureMessage?: string

failure_message contains the reason the devcontainer failed to operate.

phase?: "PHASE_UNSPECIFIED" | "PHASE_CREATING" | "PHASE_RUNNING" | 2 more

phase is the current phase of the devcontainer

One of the following:
"PHASE_UNSPECIFIED"
"PHASE_CREATING"
"PHASE_RUNNING"
"PHASE_STOPPED"
"PHASE_FAILED"
remoteUser?: string

remote_user is the user that is used to connect to the devcontainer

remoteWorkspaceFolder?: string

remote_workspace_folder is the folder that is used to connect to the devcontainer

secretsInSync?: boolean

secrets_in_sync indicates if the secrets are up to date w.r.t. the running devcontainer.

session?: string

session is the session that is currently active in the devcontainer.

warningMessage?: string

warning_message contains warnings, e.g. when the devcontainer is present but not in the expected state.

environmentUrls?: EnvironmentURLs { logs, ops, ports, 2 more }

environment_url contains the URL at which the environment can be accessed. This field is only set if the environment is running.

logs?: string

logs is the URL at which the environment logs can be accessed.

ops?: string

ops is the URL at which the environment ops service can be accessed.

ports?: Array<Port>
port?: number

port is the port number of the environment port

formatint32
maximum65535
minimum1024
url?: string

url is the URL at which the environment port can be accessed

ssh?: SSH { url }

SSH is the URL at which the environment can be accessed via SSH.

url?: string
supportBundle?: string

support_bundle is the URL at which the environment support bundle can be accessed.

failureMessage?: Array<string>

failure_message summarises why the environment failed to operate. If this is non-empty the environment has failed to operate and will likely transition to a stopped state.

machine?: Machine { failureMessage, phase, session, 3 more }

machine contains the status of the environment machine

failureMessage?: string

failure_message contains the reason the machine failed to operate.

phase?: "PHASE_UNSPECIFIED" | "PHASE_CREATING" | "PHASE_STARTING" | 5 more

phase is the current phase of the environment machine

One of the following:
"PHASE_UNSPECIFIED"
"PHASE_CREATING"
"PHASE_STARTING"
"PHASE_RUNNING"
"PHASE_STOPPING"
"PHASE_STOPPED"
"PHASE_DELETING"
"PHASE_DELETED"
session?: string

session is the session that is currently active in the machine.

timeout?: string

timeout contains the reason the environment has timed out. If this field is empty, the environment has not timed out.

versions?: Versions { amiId, supervisorCommit, supervisorVersion }

versions contains the versions of components in the machine.

amiId?: string
supervisorCommit?: string
supervisorVersion?: string
warningMessage?: string

warning_message contains warnings, e.g. when the machine is present but not in the expected state.

the phase of an environment is a simple, high-level summary of where the environment is in its lifecycle

One of the following:
"ENVIRONMENT_PHASE_UNSPECIFIED"
"ENVIRONMENT_PHASE_CREATING"
"ENVIRONMENT_PHASE_STARTING"
"ENVIRONMENT_PHASE_RUNNING"
"ENVIRONMENT_PHASE_UPDATING"
"ENVIRONMENT_PHASE_STOPPING"
"ENVIRONMENT_PHASE_STOPPED"
"ENVIRONMENT_PHASE_DELETING"
"ENVIRONMENT_PHASE_DELETED"
runnerAck?: RunnerAck { message, specVersion, statusCode }

runner_ack contains the acknowledgement from the runner that is has received the environment spec.

message?: string
specVersion?: string
statusCode?: "STATUS_CODE_UNSPECIFIED" | "STATUS_CODE_OK" | "STATUS_CODE_INVALID_RESOURCE" | "STATUS_CODE_FAILED_PRECONDITION"
One of the following:
"STATUS_CODE_UNSPECIFIED"
"STATUS_CODE_OK"
"STATUS_CODE_INVALID_RESOURCE"
"STATUS_CODE_FAILED_PRECONDITION"
secrets?: Array<Secret>

secrets contains the status of the environment secrets

id?: string

id is the unique identifier of the secret.

failureMessage?: string

failure_message contains the reason the secret failed to be materialize.

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more
One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
secretName?: string
session?: string

session is the session that is currently active in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when the secret is present but not in the expected state.

sshPublicKeys?: Array<SSHPublicKey>

ssh_public_keys contains the status of the environment ssh public keys

id?: string

id is the unique identifier of the public key

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the public key

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
statusVersion?: string

version of the status update. Environment instances themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

warningMessage?: Array<string>

warning_message contains warnings, e.g. when the environment is present but not in the expected state.

EnvironmentActivitySignal { source, timestamp }

EnvironmentActivitySignal used to signal activity for an environment.

source?: string

source of the activity signal, such as “VS Code”, “SSH”, or “Automations”. It should be a human-readable string that describes the source of the activity signal.

maxLength80
minLength3
timestamp?: string

timestamp of when the activity was observed by the source. Only reported every 5 minutes. Zero value means no activity was observed.

formatdate-time
EnvironmentMetadata { annotations, archivedAt, createdAt, 10 more }

EnvironmentMetadata is data associated with an environment that’s required for other parts of the system to function

annotations?: Record<string, string>

annotations are key/value pairs that gets attached to the environment. +internal - not yet implemented

archivedAt?: string

Time when the Environment was archived. If not set, the environment is not archived.

formatdate-time
createdAt?: string

Time when the Environment was created.

formatdate-time
creator?: Subject { id, principal }

creator is the identity of the creator of the environment

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
lastStartedAt?: string

Time when the Environment was last started (i.e. CreateEnvironment or StartEnvironment were called).

formatdate-time
lockdownAt?: string

lockdown_at is the time at which the environment becomes locked down due to the organization’s maximum environment lifetime policy. Nil when no lifetime policy applies.

formatdate-time
name?: string

name is the name of the environment as specified by the user

maxLength80
organizationId?: string

organization_id is the ID of the organization that contains the environment

formatuuid
originalContextUrl?: string

original_context_url is the normalized URL from which the environment was created

prebuildId?: string | null

prebuild_id is the ID of the prebuild this environment was created from. Only set if the environment was created from a prebuild.

formatuuid
projectId?: string

If the Environment was started from a project, the project_id will reference the project.

role is the role of the environment

One of the following:
"ENVIRONMENT_ROLE_UNSPECIFIED"
"ENVIRONMENT_ROLE_DEFAULT"
"ENVIRONMENT_ROLE_PREBUILD"
"ENVIRONMENT_ROLE_WORKFLOW"
runnerId?: string

Runner is the ID of the runner that runs this environment.

EnvironmentPhase = "ENVIRONMENT_PHASE_UNSPECIFIED" | "ENVIRONMENT_PHASE_CREATING" | "ENVIRONMENT_PHASE_STARTING" | 6 more
One of the following:
"ENVIRONMENT_PHASE_UNSPECIFIED"
"ENVIRONMENT_PHASE_CREATING"
"ENVIRONMENT_PHASE_STARTING"
"ENVIRONMENT_PHASE_RUNNING"
"ENVIRONMENT_PHASE_UPDATING"
"ENVIRONMENT_PHASE_STOPPING"
"ENVIRONMENT_PHASE_STOPPED"
"ENVIRONMENT_PHASE_DELETING"
"ENVIRONMENT_PHASE_DELETED"
EnvironmentRole = "ENVIRONMENT_ROLE_UNSPECIFIED" | "ENVIRONMENT_ROLE_DEFAULT" | "ENVIRONMENT_ROLE_PREBUILD" | "ENVIRONMENT_ROLE_WORKFLOW"

EnvironmentRole represents the role of an environment

One of the following:
"ENVIRONMENT_ROLE_UNSPECIFIED"
"ENVIRONMENT_ROLE_DEFAULT"
"ENVIRONMENT_ROLE_PREBUILD"
"ENVIRONMENT_ROLE_WORKFLOW"
EnvironmentSpec { admission, automationsFile, content, 10 more }

EnvironmentSpec specifies the configuration of an environment for an environment start

admission?: AdmissionLevel

admission controlls who can access the environment and its ports.

One of the following:
"ADMISSION_LEVEL_UNSPECIFIED"
"ADMISSION_LEVEL_OWNER_ONLY"
"ADMISSION_LEVEL_EVERYONE"
"ADMISSION_LEVEL_ORGANIZATION"
"ADMISSION_LEVEL_CREATOR_ONLY"
automationsFile?: AutomationsFile { automationsFilePath, session, triggerFilter }

automations_file is the automations file spec of the environment

automationsFilePath?: string

automations_file_path is the path to the automations file that is applied in the environment, relative to the repo root. path must not be absolute (start with a /):

this.matches('^$|^[^/].*')
session?: string
triggerFilter?: Array<AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more } >

trigger_filter specifies which automation triggers should execute. When set, only automations matching these triggers will run. If empty/unset, all triggers are evaluated normally.

beforeSnapshot?: boolean
manual?: boolean
postDevcontainerStart?: boolean
postEnvironmentStart?: boolean
postMachineStart?: boolean
prebuild?: boolean
content?: Content { gitEmail, gitUsername, initializer, session }

content is the content spec of the environment

gitEmail?: string

The Git email address

gitUsername?: string

The Git username

initializer?: EnvironmentInitializer { specs }

initializer configures how the environment is to be initialized

specs?: Array<Spec>
contextUrl?: ContextURL { url }
url?: string

url is the URL from which the environment is created

formaturi
git?: Git { checkoutLocation, cloneTarget, remoteUri, 2 more }
checkoutLocation?: string

a path relative to the environment root in which the code will be checked out to

cloneTarget?: string

the value for the clone target mode - use depends on the target mode

remoteUri?: string

remote_uri is the Git remote origin

targetMode?: "CLONE_TARGET_MODE_UNSPECIFIED" | "CLONE_TARGET_MODE_REMOTE_HEAD" | "CLONE_TARGET_MODE_REMOTE_COMMIT" | 3 more

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstreamRemoteUri?: string

upstream_Remote_uri is the fork upstream of a repository

session?: string
desiredPhase?: EnvironmentPhase

Phase is the desired phase of the environment

One of the following:
"ENVIRONMENT_PHASE_UNSPECIFIED"
"ENVIRONMENT_PHASE_CREATING"
"ENVIRONMENT_PHASE_STARTING"
"ENVIRONMENT_PHASE_RUNNING"
"ENVIRONMENT_PHASE_UPDATING"
"ENVIRONMENT_PHASE_STOPPING"
"ENVIRONMENT_PHASE_STOPPED"
"ENVIRONMENT_PHASE_DELETING"
"ENVIRONMENT_PHASE_DELETED"
devcontainer?: Devcontainer { defaultDevcontainerImage, devcontainerFilePath, dotfiles, 2 more }

devcontainer is the devcontainer spec of the environment

defaultDevcontainerImage?: string

default_devcontainer_image is the default image that is used to start the devcontainer if no devcontainer config file is found

devcontainerFilePath?: string

devcontainer_file_path is the path to the devcontainer file relative to the repo root path must not be absolute (start with a /):

this.matches('^$|^[^/].*')
dotfiles?: Dotfiles { repository }

Experimental: dotfiles is the dotfiles configuration of the devcontainer

repository: string

URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)

formaturi
lifecycleStage?: "LIFECYCLE_STAGE_UNSPECIFIED" | "LIFECYCLE_STAGE_FULL" | "LIFECYCLE_STAGE_PREBUILD"

lifecycle_stage controls which devcontainer lifecycle commands are executed. Defaults to FULL if not specified.

One of the following:
"LIFECYCLE_STAGE_UNSPECIFIED"
"LIFECYCLE_STAGE_FULL"
"LIFECYCLE_STAGE_PREBUILD"
session?: string
kernelControlsConfig?: KernelControlsConfig { veto }

kernel_controls_config configures kernel-level controls for this environment

veto?: Veto { exec }

veto controls blocking mechanisms

exec?: Exec { action, denylist, enabled }

exec controls executable blocking

action specifies what action kernel-level controls take on policy violations

One of the following:
"KERNEL_CONTROLS_ACTION_UNSPECIFIED"
"KERNEL_CONTROLS_ACTION_BLOCK"
"KERNEL_CONTROLS_ACTION_AUDIT"
denylist?: Array<string>

denylist is the list of executable paths or names to block

enabled?: boolean

enabled controls whether executable blocking is active

machine?: Machine { class, session }

machine is the machine spec of the environment

class?: string

Class denotes the class of the environment we ought to start

session?: string
ports?: Array<Port>

ports is the set of ports which ought to be exposed to your network

admission?: AdmissionLevel

policy of this port

One of the following:
"ADMISSION_LEVEL_UNSPECIFIED"
"ADMISSION_LEVEL_OWNER_ONLY"
"ADMISSION_LEVEL_EVERYONE"
"ADMISSION_LEVEL_ORGANIZATION"
"ADMISSION_LEVEL_CREATOR_ONLY"
name?: string

name of this port

maxLength100
minLength1
port?: number

port number

formatint32
maximum65535
minimum1024
protocol?: "PROTOCOL_UNSPECIFIED" | "PROTOCOL_HTTP" | "PROTOCOL_HTTPS"

protocol for communication (Gateway proxy → user environment service). this setting only affects the protocol used between Gateway and user environment services.

One of the following:
"PROTOCOL_UNSPECIFIED"
"PROTOCOL_HTTP"
"PROTOCOL_HTTPS"
secrets?: Array<Secret>

secrets are confidential data that is mounted into the environment

id?: string

id is the unique identifier of the secret.

apiOnly?: boolean

api_only indicates the secret is only available via API/CLI. These secrets are resolved but NOT automatically injected into services or devcontainers.

containerRegistryBasicAuthHost?: string

container_registry_basic_auth_host is the hostname of the container registry that supports basic auth

credentialProxy?: CredentialProxy { format, header, targetHosts }

credential_proxy configures transparent credential injection via the credential proxy. When set, the credential proxy intercepts HTTPS traffic to the target hosts and replaces the dummy secret value with the real value in the specified HTTP header. The real secret value is never exposed in the environment. This field is orthogonal to mount — a secret can be both mounted (e.g. as a git credential) and proxied at the same time.

format?: "FORMAT_UNSPECIFIED" | "FORMAT_PLAIN" | "FORMAT_BASE64"

format describes how the secret value is encoded. The proxy uses this to decode the value before injecting it into the header.

One of the following:
"FORMAT_UNSPECIFIED"
"FORMAT_PLAIN"
"FORMAT_BASE64"
header?: string

header is the HTTP header name to inject (e.g. “Authorization”).

targetHosts?: Array<string>

target_hosts lists the hostnames to intercept (for example “github.com” or “*.github.com”). Wildcards are subdomain-only and do not match the apex domain.

environmentVariable?: string
filePath?: string

file_path is the path inside the devcontainer where the secret is mounted

gitCredentialHost?: string
name?: string

name is the human readable description of the secret

scope?: "SCOPE_UNSPECIFIED" | "SCOPE_ORGANIZATION" | "SCOPE_PROJECT" | 3 more

scope indicates where this secret originated from. Used to filter secrets during build (only org and project secrets are injected).

One of the following:
"SCOPE_UNSPECIFIED"
"SCOPE_ORGANIZATION"
"SCOPE_PROJECT"
"SCOPE_USER"
"SCOPE_SERVICE_ACCOUNT"
"SCOPE_RUNNER"
session?: string

session indicated the current session of the secret. When the session does not change, secrets are not reloaded in the environment.

source?: string

source is the source of the secret, for now control-plane or runner

sourceRef?: string

source_ref into the source, in case of control-plane this is uuid of the secret

specVersion?: string

version of the spec. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.spec_version < b.spec_version then a was the spec before b.

sshPublicKeys?: Array<SSHPublicKey>

ssh_public_keys are the public keys used to ssh into the environment

id?: string

id is the unique identifier of the public key

value?: string

value is the actual public key in the public key file format

timeout?: Timeout { disconnected }

Timeout configures the environment timeout

disconnected?: string

inacitivity is the maximum time of disconnection before the environment is stopped or paused. Minimum duration is 30 minutes. Set to 0 to disable. value must be 0s (disabled) or at least 1800s (30 minutes):

this == duration('0s') || this >= duration('1800s')
formatregex
workflowActionId?: string | null

workflow_action_id is an optional reference to the workflow execution action that created this environment. Used for tracking and event correlation.

formatuuid
EnvironmentStatus { activitySignal, automationsFile, content, 10 more }

EnvironmentStatus describes an environment status

activitySignal?: EnvironmentActivitySignal { source, timestamp }

activity_signal is the last activity signal for the environment.

source?: string

source of the activity signal, such as “VS Code”, “SSH”, or “Automations”. It should be a human-readable string that describes the source of the activity signal.

maxLength80
minLength3
timestamp?: string

timestamp of when the activity was observed by the source. Only reported every 5 minutes. Zero value means no activity was observed.

formatdate-time
automationsFile?: AutomationsFile { automationsFilePath, automationsFilePresence, failureMessage, 3 more }

automations_file contains the status of the automations file.

automationsFilePath?: string

automations_file_path is the path to the automations file relative to the repo root.

automationsFilePresence?: "PRESENCE_UNSPECIFIED" | "PRESENCE_ABSENT" | "PRESENCE_DISCOVERED" | "PRESENCE_SPECIFIED"

automations_file_presence indicates how an automations file is present in the environment.

One of the following:
"PRESENCE_UNSPECIFIED"
"PRESENCE_ABSENT"
"PRESENCE_DISCOVERED"
"PRESENCE_SPECIFIED"
failureMessage?: string

failure_message contains the reason the automations file failed to be applied. This is only set if the phase is FAILED.

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the automations file.

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
session?: string

session is the automations file session that is currently applied in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when no triggers are defined in the automations file.

content?: Content { contentLocationInMachine, failureMessage, git, 3 more }

content contains the status of the environment content.

contentLocationInMachine?: string

content_location_in_machine is the location of the content in the machine

failureMessage?: string

failure_message contains the reason the content initialization failed.

git?: Git { branch, changedFiles, cloneUrl, 4 more }

git is the Git working copy status of the environment. Note: this is a best-effort field and more often than not will not be present. Its absence does not indicate the absence of a working copy.

branch?: string

branch is branch we’re currently on

changedFiles?: Array<ChangedFile>

changed_files is an array of changed files in the environment, possibly truncated

changeType?: "CHANGE_TYPE_UNSPECIFIED" | "CHANGE_TYPE_ADDED" | "CHANGE_TYPE_MODIFIED" | 5 more

ChangeType is the type of change that happened to the file

One of the following:
"CHANGE_TYPE_UNSPECIFIED"
"CHANGE_TYPE_ADDED"
"CHANGE_TYPE_MODIFIED"
"CHANGE_TYPE_DELETED"
"CHANGE_TYPE_RENAMED"
"CHANGE_TYPE_COPIED"
"CHANGE_TYPE_UPDATED_BUT_UNMERGED"
"CHANGE_TYPE_UNTRACKED"
oldPath?: string

old_path is the previous path of the file before a rename or copy. Only set when change_type is RENAMED or COPIED.

maxLength255
path?: string

path is the path of the file

maxLength255
cloneUrl?: string

clone_url is the repository url as you would pass it to “git clone”. Only HTTPS clone URLs are supported.

latestCommit?: string

latest_commit is the most recent commit on the current branch

totalChangedFiles?: number
formatint32
totalUnpushedCommits?: number

the total number of unpushed changes

formatint32
unpushedCommits?: Array<string>

unpushed_commits is an array of unpushed changes in the environment, possibly truncated

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the environment content

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
session?: string

session is the session that is currently active in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when the content is present but not in the expected state.

devcontainer?: Devcontainer { containerId, containerName, devcontainerconfigInSync, 9 more }

devcontainer contains the status of the devcontainer.

containerId?: string

container_id is the ID of the container.

containerName?: string

container_name is the name of the container that is used to connect to the devcontainer

devcontainerconfigInSync?: boolean

devcontainerconfig_in_sync indicates if the devcontainer is up to date w.r.t. the devcontainer config file.

devcontainerFilePath?: string

devcontainer_file_path is the path to the devcontainer file relative to the repo root

devcontainerFilePresence?: "PRESENCE_UNSPECIFIED" | "PRESENCE_GENERATED" | "PRESENCE_DISCOVERED" | "PRESENCE_SPECIFIED"

devcontainer_file_presence indicates how the devcontainer file is present in the repo.

One of the following:
"PRESENCE_UNSPECIFIED"
"PRESENCE_GENERATED"
"PRESENCE_DISCOVERED"
"PRESENCE_SPECIFIED"
failureMessage?: string

failure_message contains the reason the devcontainer failed to operate.

phase?: "PHASE_UNSPECIFIED" | "PHASE_CREATING" | "PHASE_RUNNING" | 2 more

phase is the current phase of the devcontainer

One of the following:
"PHASE_UNSPECIFIED"
"PHASE_CREATING"
"PHASE_RUNNING"
"PHASE_STOPPED"
"PHASE_FAILED"
remoteUser?: string

remote_user is the user that is used to connect to the devcontainer

remoteWorkspaceFolder?: string

remote_workspace_folder is the folder that is used to connect to the devcontainer

secretsInSync?: boolean

secrets_in_sync indicates if the secrets are up to date w.r.t. the running devcontainer.

session?: string

session is the session that is currently active in the devcontainer.

warningMessage?: string

warning_message contains warnings, e.g. when the devcontainer is present but not in the expected state.

environmentUrls?: EnvironmentURLs { logs, ops, ports, 2 more }

environment_url contains the URL at which the environment can be accessed. This field is only set if the environment is running.

logs?: string

logs is the URL at which the environment logs can be accessed.

ops?: string

ops is the URL at which the environment ops service can be accessed.

ports?: Array<Port>
port?: number

port is the port number of the environment port

formatint32
maximum65535
minimum1024
url?: string

url is the URL at which the environment port can be accessed

ssh?: SSH { url }

SSH is the URL at which the environment can be accessed via SSH.

url?: string
supportBundle?: string

support_bundle is the URL at which the environment support bundle can be accessed.

failureMessage?: Array<string>

failure_message summarises why the environment failed to operate. If this is non-empty the environment has failed to operate and will likely transition to a stopped state.

machine?: Machine { failureMessage, phase, session, 3 more }

machine contains the status of the environment machine

failureMessage?: string

failure_message contains the reason the machine failed to operate.

phase?: "PHASE_UNSPECIFIED" | "PHASE_CREATING" | "PHASE_STARTING" | 5 more

phase is the current phase of the environment machine

One of the following:
"PHASE_UNSPECIFIED"
"PHASE_CREATING"
"PHASE_STARTING"
"PHASE_RUNNING"
"PHASE_STOPPING"
"PHASE_STOPPED"
"PHASE_DELETING"
"PHASE_DELETED"
session?: string

session is the session that is currently active in the machine.

timeout?: string

timeout contains the reason the environment has timed out. If this field is empty, the environment has not timed out.

versions?: Versions { amiId, supervisorCommit, supervisorVersion }

versions contains the versions of components in the machine.

amiId?: string
supervisorCommit?: string
supervisorVersion?: string
warningMessage?: string

warning_message contains warnings, e.g. when the machine is present but not in the expected state.

the phase of an environment is a simple, high-level summary of where the environment is in its lifecycle

One of the following:
"ENVIRONMENT_PHASE_UNSPECIFIED"
"ENVIRONMENT_PHASE_CREATING"
"ENVIRONMENT_PHASE_STARTING"
"ENVIRONMENT_PHASE_RUNNING"
"ENVIRONMENT_PHASE_UPDATING"
"ENVIRONMENT_PHASE_STOPPING"
"ENVIRONMENT_PHASE_STOPPED"
"ENVIRONMENT_PHASE_DELETING"
"ENVIRONMENT_PHASE_DELETED"
runnerAck?: RunnerAck { message, specVersion, statusCode }

runner_ack contains the acknowledgement from the runner that is has received the environment spec.

message?: string
specVersion?: string
statusCode?: "STATUS_CODE_UNSPECIFIED" | "STATUS_CODE_OK" | "STATUS_CODE_INVALID_RESOURCE" | "STATUS_CODE_FAILED_PRECONDITION"
One of the following:
"STATUS_CODE_UNSPECIFIED"
"STATUS_CODE_OK"
"STATUS_CODE_INVALID_RESOURCE"
"STATUS_CODE_FAILED_PRECONDITION"
secrets?: Array<Secret>

secrets contains the status of the environment secrets

id?: string

id is the unique identifier of the secret.

failureMessage?: string

failure_message contains the reason the secret failed to be materialize.

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more
One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
secretName?: string
session?: string

session is the session that is currently active in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when the secret is present but not in the expected state.

sshPublicKeys?: Array<SSHPublicKey>

ssh_public_keys contains the status of the environment ssh public keys

id?: string

id is the unique identifier of the public key

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the public key

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
statusVersion?: string

version of the status update. Environment instances themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

warningMessage?: Array<string>

warning_message contains warnings, e.g. when the environment is present but not in the expected state.

KernelControlsConfig { veto }

KernelControlsConfig configures kernel-level controls for the environment

veto?: Veto { exec }

veto controls blocking mechanisms

exec?: Exec { action, denylist, enabled }

exec controls executable blocking

action specifies what action kernel-level controls take on policy violations

One of the following:
"KERNEL_CONTROLS_ACTION_UNSPECIFIED"
"KERNEL_CONTROLS_ACTION_BLOCK"
"KERNEL_CONTROLS_ACTION_AUDIT"
denylist?: Array<string>

denylist is the list of executable paths or names to block

enabled?: boolean

enabled controls whether executable blocking is active

Veto { exec }

Veto controls kernel-level blocking mechanisms

exec?: Exec { action, denylist, enabled }

exec controls executable blocking

action specifies what action kernel-level controls take on policy violations

One of the following:
"KERNEL_CONTROLS_ACTION_UNSPECIFIED"
"KERNEL_CONTROLS_ACTION_BLOCK"
"KERNEL_CONTROLS_ACTION_AUDIT"
denylist?: Array<string>

denylist is the list of executable paths or names to block

enabled?: boolean

enabled controls whether executable blocking is active

EnvironmentCreateResponse { environment }
environment: Environment { id, metadata, spec, status }

+resource get environment

id: string

ID is a unique identifier of this environment. No other environment with the same name must be managed by this environment manager

metadata?: EnvironmentMetadata { annotations, archivedAt, createdAt, 10 more }

Metadata is data associated with this environment that’s required for other parts of Gitpod to function

annotations?: Record<string, string>

annotations are key/value pairs that gets attached to the environment. +internal - not yet implemented

archivedAt?: string

Time when the Environment was archived. If not set, the environment is not archived.

formatdate-time
createdAt?: string

Time when the Environment was created.

formatdate-time
creator?: Subject { id, principal }

creator is the identity of the creator of the environment

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
lastStartedAt?: string

Time when the Environment was last started (i.e. CreateEnvironment or StartEnvironment were called).

formatdate-time
lockdownAt?: string

lockdown_at is the time at which the environment becomes locked down due to the organization’s maximum environment lifetime policy. Nil when no lifetime policy applies.

formatdate-time
name?: string

name is the name of the environment as specified by the user

maxLength80
organizationId?: string

organization_id is the ID of the organization that contains the environment

formatuuid
originalContextUrl?: string

original_context_url is the normalized URL from which the environment was created

prebuildId?: string | null

prebuild_id is the ID of the prebuild this environment was created from. Only set if the environment was created from a prebuild.

formatuuid
projectId?: string

If the Environment was started from a project, the project_id will reference the project.

role is the role of the environment

One of the following:
"ENVIRONMENT_ROLE_UNSPECIFIED"
"ENVIRONMENT_ROLE_DEFAULT"
"ENVIRONMENT_ROLE_PREBUILD"
"ENVIRONMENT_ROLE_WORKFLOW"
runnerId?: string

Runner is the ID of the runner that runs this environment.

spec?: EnvironmentSpec { admission, automationsFile, content, 10 more }

Spec is the configuration of the environment that’s required for the runner to start the environment

admission?: AdmissionLevel

admission controlls who can access the environment and its ports.

One of the following:
"ADMISSION_LEVEL_UNSPECIFIED"
"ADMISSION_LEVEL_OWNER_ONLY"
"ADMISSION_LEVEL_EVERYONE"
"ADMISSION_LEVEL_ORGANIZATION"
"ADMISSION_LEVEL_CREATOR_ONLY"
automationsFile?: AutomationsFile { automationsFilePath, session, triggerFilter }

automations_file is the automations file spec of the environment

automationsFilePath?: string

automations_file_path is the path to the automations file that is applied in the environment, relative to the repo root. path must not be absolute (start with a /):

this.matches('^$|^[^/].*')
session?: string
triggerFilter?: Array<AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more } >

trigger_filter specifies which automation triggers should execute. When set, only automations matching these triggers will run. If empty/unset, all triggers are evaluated normally.

beforeSnapshot?: boolean
manual?: boolean
postDevcontainerStart?: boolean
postEnvironmentStart?: boolean
postMachineStart?: boolean
prebuild?: boolean
content?: Content { gitEmail, gitUsername, initializer, session }

content is the content spec of the environment

gitEmail?: string

The Git email address

gitUsername?: string

The Git username

initializer?: EnvironmentInitializer { specs }

initializer configures how the environment is to be initialized

specs?: Array<Spec>
contextUrl?: ContextURL { url }
url?: string

url is the URL from which the environment is created

formaturi
git?: Git { checkoutLocation, cloneTarget, remoteUri, 2 more }
checkoutLocation?: string

a path relative to the environment root in which the code will be checked out to

cloneTarget?: string

the value for the clone target mode - use depends on the target mode

remoteUri?: string

remote_uri is the Git remote origin

targetMode?: "CLONE_TARGET_MODE_UNSPECIFIED" | "CLONE_TARGET_MODE_REMOTE_HEAD" | "CLONE_TARGET_MODE_REMOTE_COMMIT" | 3 more

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstreamRemoteUri?: string

upstream_Remote_uri is the fork upstream of a repository

session?: string
desiredPhase?: EnvironmentPhase

Phase is the desired phase of the environment

One of the following:
"ENVIRONMENT_PHASE_UNSPECIFIED"
"ENVIRONMENT_PHASE_CREATING"
"ENVIRONMENT_PHASE_STARTING"
"ENVIRONMENT_PHASE_RUNNING"
"ENVIRONMENT_PHASE_UPDATING"
"ENVIRONMENT_PHASE_STOPPING"
"ENVIRONMENT_PHASE_STOPPED"
"ENVIRONMENT_PHASE_DELETING"
"ENVIRONMENT_PHASE_DELETED"
devcontainer?: Devcontainer { defaultDevcontainerImage, devcontainerFilePath, dotfiles, 2 more }

devcontainer is the devcontainer spec of the environment

defaultDevcontainerImage?: string

default_devcontainer_image is the default image that is used to start the devcontainer if no devcontainer config file is found

devcontainerFilePath?: string

devcontainer_file_path is the path to the devcontainer file relative to the repo root path must not be absolute (start with a /):

this.matches('^$|^[^/].*')
dotfiles?: Dotfiles { repository }

Experimental: dotfiles is the dotfiles configuration of the devcontainer

repository: string

URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)

formaturi
lifecycleStage?: "LIFECYCLE_STAGE_UNSPECIFIED" | "LIFECYCLE_STAGE_FULL" | "LIFECYCLE_STAGE_PREBUILD"

lifecycle_stage controls which devcontainer lifecycle commands are executed. Defaults to FULL if not specified.

One of the following:
"LIFECYCLE_STAGE_UNSPECIFIED"
"LIFECYCLE_STAGE_FULL"
"LIFECYCLE_STAGE_PREBUILD"
session?: string
kernelControlsConfig?: KernelControlsConfig { veto }

kernel_controls_config configures kernel-level controls for this environment

veto?: Veto { exec }

veto controls blocking mechanisms

exec?: Exec { action, denylist, enabled }

exec controls executable blocking

action specifies what action kernel-level controls take on policy violations

One of the following:
"KERNEL_CONTROLS_ACTION_UNSPECIFIED"
"KERNEL_CONTROLS_ACTION_BLOCK"
"KERNEL_CONTROLS_ACTION_AUDIT"
denylist?: Array<string>

denylist is the list of executable paths or names to block

enabled?: boolean

enabled controls whether executable blocking is active

machine?: Machine { class, session }

machine is the machine spec of the environment

class?: string

Class denotes the class of the environment we ought to start

session?: string
ports?: Array<Port>

ports is the set of ports which ought to be exposed to your network

admission?: AdmissionLevel

policy of this port

One of the following:
"ADMISSION_LEVEL_UNSPECIFIED"
"ADMISSION_LEVEL_OWNER_ONLY"
"ADMISSION_LEVEL_EVERYONE"
"ADMISSION_LEVEL_ORGANIZATION"
"ADMISSION_LEVEL_CREATOR_ONLY"
name?: string

name of this port

maxLength100
minLength1
port?: number

port number

formatint32
maximum65535
minimum1024
protocol?: "PROTOCOL_UNSPECIFIED" | "PROTOCOL_HTTP" | "PROTOCOL_HTTPS"

protocol for communication (Gateway proxy → user environment service). this setting only affects the protocol used between Gateway and user environment services.

One of the following:
"PROTOCOL_UNSPECIFIED"
"PROTOCOL_HTTP"
"PROTOCOL_HTTPS"
secrets?: Array<Secret>

secrets are confidential data that is mounted into the environment

id?: string

id is the unique identifier of the secret.

apiOnly?: boolean

api_only indicates the secret is only available via API/CLI. These secrets are resolved but NOT automatically injected into services or devcontainers.

containerRegistryBasicAuthHost?: string

container_registry_basic_auth_host is the hostname of the container registry that supports basic auth

credentialProxy?: CredentialProxy { format, header, targetHosts }

credential_proxy configures transparent credential injection via the credential proxy. When set, the credential proxy intercepts HTTPS traffic to the target hosts and replaces the dummy secret value with the real value in the specified HTTP header. The real secret value is never exposed in the environment. This field is orthogonal to mount — a secret can be both mounted (e.g. as a git credential) and proxied at the same time.

format?: "FORMAT_UNSPECIFIED" | "FORMAT_PLAIN" | "FORMAT_BASE64"

format describes how the secret value is encoded. The proxy uses this to decode the value before injecting it into the header.

One of the following:
"FORMAT_UNSPECIFIED"
"FORMAT_PLAIN"
"FORMAT_BASE64"
header?: string

header is the HTTP header name to inject (e.g. “Authorization”).

targetHosts?: Array<string>

target_hosts lists the hostnames to intercept (for example “github.com” or “*.github.com”). Wildcards are subdomain-only and do not match the apex domain.

environmentVariable?: string
filePath?: string

file_path is the path inside the devcontainer where the secret is mounted

gitCredentialHost?: string
name?: string

name is the human readable description of the secret

scope?: "SCOPE_UNSPECIFIED" | "SCOPE_ORGANIZATION" | "SCOPE_PROJECT" | 3 more

scope indicates where this secret originated from. Used to filter secrets during build (only org and project secrets are injected).

One of the following:
"SCOPE_UNSPECIFIED"
"SCOPE_ORGANIZATION"
"SCOPE_PROJECT"
"SCOPE_USER"
"SCOPE_SERVICE_ACCOUNT"
"SCOPE_RUNNER"
session?: string

session indicated the current session of the secret. When the session does not change, secrets are not reloaded in the environment.

source?: string

source is the source of the secret, for now control-plane or runner

sourceRef?: string

source_ref into the source, in case of control-plane this is uuid of the secret

specVersion?: string

version of the spec. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.spec_version < b.spec_version then a was the spec before b.

sshPublicKeys?: Array<SSHPublicKey>

ssh_public_keys are the public keys used to ssh into the environment

id?: string

id is the unique identifier of the public key

value?: string

value is the actual public key in the public key file format

timeout?: Timeout { disconnected }

Timeout configures the environment timeout

disconnected?: string

inacitivity is the maximum time of disconnection before the environment is stopped or paused. Minimum duration is 30 minutes. Set to 0 to disable. value must be 0s (disabled) or at least 1800s (30 minutes):

this == duration('0s') || this >= duration('1800s')
formatregex
workflowActionId?: string | null

workflow_action_id is an optional reference to the workflow execution action that created this environment. Used for tracking and event correlation.

formatuuid
status?: EnvironmentStatus { activitySignal, automationsFile, content, 10 more }

Status is the current status of the environment

activitySignal?: EnvironmentActivitySignal { source, timestamp }

activity_signal is the last activity signal for the environment.

source?: string

source of the activity signal, such as “VS Code”, “SSH”, or “Automations”. It should be a human-readable string that describes the source of the activity signal.

maxLength80
minLength3
timestamp?: string

timestamp of when the activity was observed by the source. Only reported every 5 minutes. Zero value means no activity was observed.

formatdate-time
automationsFile?: AutomationsFile { automationsFilePath, automationsFilePresence, failureMessage, 3 more }

automations_file contains the status of the automations file.

automationsFilePath?: string

automations_file_path is the path to the automations file relative to the repo root.

automationsFilePresence?: "PRESENCE_UNSPECIFIED" | "PRESENCE_ABSENT" | "PRESENCE_DISCOVERED" | "PRESENCE_SPECIFIED"

automations_file_presence indicates how an automations file is present in the environment.

One of the following:
"PRESENCE_UNSPECIFIED"
"PRESENCE_ABSENT"
"PRESENCE_DISCOVERED"
"PRESENCE_SPECIFIED"
failureMessage?: string

failure_message contains the reason the automations file failed to be applied. This is only set if the phase is FAILED.

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the automations file.

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
session?: string

session is the automations file session that is currently applied in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when no triggers are defined in the automations file.

content?: Content { contentLocationInMachine, failureMessage, git, 3 more }

content contains the status of the environment content.

contentLocationInMachine?: string

content_location_in_machine is the location of the content in the machine

failureMessage?: string

failure_message contains the reason the content initialization failed.

git?: Git { branch, changedFiles, cloneUrl, 4 more }

git is the Git working copy status of the environment. Note: this is a best-effort field and more often than not will not be present. Its absence does not indicate the absence of a working copy.

branch?: string

branch is branch we’re currently on

changedFiles?: Array<ChangedFile>

changed_files is an array of changed files in the environment, possibly truncated

changeType?: "CHANGE_TYPE_UNSPECIFIED" | "CHANGE_TYPE_ADDED" | "CHANGE_TYPE_MODIFIED" | 5 more

ChangeType is the type of change that happened to the file

One of the following:
"CHANGE_TYPE_UNSPECIFIED"
"CHANGE_TYPE_ADDED"
"CHANGE_TYPE_MODIFIED"
"CHANGE_TYPE_DELETED"
"CHANGE_TYPE_RENAMED"
"CHANGE_TYPE_COPIED"
"CHANGE_TYPE_UPDATED_BUT_UNMERGED"
"CHANGE_TYPE_UNTRACKED"
oldPath?: string

old_path is the previous path of the file before a rename or copy. Only set when change_type is RENAMED or COPIED.

maxLength255
path?: string

path is the path of the file

maxLength255
cloneUrl?: string

clone_url is the repository url as you would pass it to “git clone”. Only HTTPS clone URLs are supported.

latestCommit?: string

latest_commit is the most recent commit on the current branch

totalChangedFiles?: number
formatint32
totalUnpushedCommits?: number

the total number of unpushed changes

formatint32
unpushedCommits?: Array<string>

unpushed_commits is an array of unpushed changes in the environment, possibly truncated

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the environment content

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
session?: string

session is the session that is currently active in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when the content is present but not in the expected state.

devcontainer?: Devcontainer { containerId, containerName, devcontainerconfigInSync, 9 more }

devcontainer contains the status of the devcontainer.

containerId?: string

container_id is the ID of the container.

containerName?: string

container_name is the name of the container that is used to connect to the devcontainer

devcontainerconfigInSync?: boolean

devcontainerconfig_in_sync indicates if the devcontainer is up to date w.r.t. the devcontainer config file.

devcontainerFilePath?: string

devcontainer_file_path is the path to the devcontainer file relative to the repo root

devcontainerFilePresence?: "PRESENCE_UNSPECIFIED" | "PRESENCE_GENERATED" | "PRESENCE_DISCOVERED" | "PRESENCE_SPECIFIED"

devcontainer_file_presence indicates how the devcontainer file is present in the repo.

One of the following:
"PRESENCE_UNSPECIFIED"
"PRESENCE_GENERATED"
"PRESENCE_DISCOVERED"
"PRESENCE_SPECIFIED"
failureMessage?: string

failure_message contains the reason the devcontainer failed to operate.

phase?: "PHASE_UNSPECIFIED" | "PHASE_CREATING" | "PHASE_RUNNING" | 2 more

phase is the current phase of the devcontainer

One of the following:
"PHASE_UNSPECIFIED"
"PHASE_CREATING"
"PHASE_RUNNING"
"PHASE_STOPPED"
"PHASE_FAILED"
remoteUser?: string

remote_user is the user that is used to connect to the devcontainer

remoteWorkspaceFolder?: string

remote_workspace_folder is the folder that is used to connect to the devcontainer

secretsInSync?: boolean

secrets_in_sync indicates if the secrets are up to date w.r.t. the running devcontainer.

session?: string

session is the session that is currently active in the devcontainer.

warningMessage?: string

warning_message contains warnings, e.g. when the devcontainer is present but not in the expected state.

environmentUrls?: EnvironmentURLs { logs, ops, ports, 2 more }

environment_url contains the URL at which the environment can be accessed. This field is only set if the environment is running.

logs?: string

logs is the URL at which the environment logs can be accessed.

ops?: string

ops is the URL at which the environment ops service can be accessed.

ports?: Array<Port>
port?: number

port is the port number of the environment port

formatint32
maximum65535
minimum1024
url?: string

url is the URL at which the environment port can be accessed

ssh?: SSH { url }

SSH is the URL at which the environment can be accessed via SSH.

url?: string
supportBundle?: string

support_bundle is the URL at which the environment support bundle can be accessed.

failureMessage?: Array<string>

failure_message summarises why the environment failed to operate. If this is non-empty the environment has failed to operate and will likely transition to a stopped state.

machine?: Machine { failureMessage, phase, session, 3 more }

machine contains the status of the environment machine

failureMessage?: string

failure_message contains the reason the machine failed to operate.

phase?: "PHASE_UNSPECIFIED" | "PHASE_CREATING" | "PHASE_STARTING" | 5 more

phase is the current phase of the environment machine

One of the following:
"PHASE_UNSPECIFIED"
"PHASE_CREATING"
"PHASE_STARTING"
"PHASE_RUNNING"
"PHASE_STOPPING"
"PHASE_STOPPED"
"PHASE_DELETING"
"PHASE_DELETED"
session?: string

session is the session that is currently active in the machine.

timeout?: string

timeout contains the reason the environment has timed out. If this field is empty, the environment has not timed out.

versions?: Versions { amiId, supervisorCommit, supervisorVersion }

versions contains the versions of components in the machine.

amiId?: string
supervisorCommit?: string
supervisorVersion?: string
warningMessage?: string

warning_message contains warnings, e.g. when the machine is present but not in the expected state.

the phase of an environment is a simple, high-level summary of where the environment is in its lifecycle

One of the following:
"ENVIRONMENT_PHASE_UNSPECIFIED"
"ENVIRONMENT_PHASE_CREATING"
"ENVIRONMENT_PHASE_STARTING"
"ENVIRONMENT_PHASE_RUNNING"
"ENVIRONMENT_PHASE_UPDATING"
"ENVIRONMENT_PHASE_STOPPING"
"ENVIRONMENT_PHASE_STOPPED"
"ENVIRONMENT_PHASE_DELETING"
"ENVIRONMENT_PHASE_DELETED"
runnerAck?: RunnerAck { message, specVersion, statusCode }

runner_ack contains the acknowledgement from the runner that is has received the environment spec.

message?: string
specVersion?: string
statusCode?: "STATUS_CODE_UNSPECIFIED" | "STATUS_CODE_OK" | "STATUS_CODE_INVALID_RESOURCE" | "STATUS_CODE_FAILED_PRECONDITION"
One of the following:
"STATUS_CODE_UNSPECIFIED"
"STATUS_CODE_OK"
"STATUS_CODE_INVALID_RESOURCE"
"STATUS_CODE_FAILED_PRECONDITION"
secrets?: Array<Secret>

secrets contains the status of the environment secrets

id?: string

id is the unique identifier of the secret.

failureMessage?: string

failure_message contains the reason the secret failed to be materialize.

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more
One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
secretName?: string
session?: string

session is the session that is currently active in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when the secret is present but not in the expected state.

sshPublicKeys?: Array<SSHPublicKey>

ssh_public_keys contains the status of the environment ssh public keys

id?: string

id is the unique identifier of the public key

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the public key

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
statusVersion?: string

version of the status update. Environment instances themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

warningMessage?: Array<string>

warning_message contains warnings, e.g. when the environment is present but not in the expected state.

EnvironmentCreateEnvironmentTokenResponse { accessToken }
accessToken: string

access_token is the token that can be used for environment authentication

EnvironmentCreateFromProjectResponse { environment }
environment: Environment { id, metadata, spec, status }

+resource get environment

id: string

ID is a unique identifier of this environment. No other environment with the same name must be managed by this environment manager

metadata?: EnvironmentMetadata { annotations, archivedAt, createdAt, 10 more }

Metadata is data associated with this environment that’s required for other parts of Gitpod to function

annotations?: Record<string, string>

annotations are key/value pairs that gets attached to the environment. +internal - not yet implemented

archivedAt?: string

Time when the Environment was archived. If not set, the environment is not archived.

formatdate-time
createdAt?: string

Time when the Environment was created.

formatdate-time
creator?: Subject { id, principal }

creator is the identity of the creator of the environment

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
lastStartedAt?: string

Time when the Environment was last started (i.e. CreateEnvironment or StartEnvironment were called).

formatdate-time
lockdownAt?: string

lockdown_at is the time at which the environment becomes locked down due to the organization’s maximum environment lifetime policy. Nil when no lifetime policy applies.

formatdate-time
name?: string

name is the name of the environment as specified by the user

maxLength80
organizationId?: string

organization_id is the ID of the organization that contains the environment

formatuuid
originalContextUrl?: string

original_context_url is the normalized URL from which the environment was created

prebuildId?: string | null

prebuild_id is the ID of the prebuild this environment was created from. Only set if the environment was created from a prebuild.

formatuuid
projectId?: string

If the Environment was started from a project, the project_id will reference the project.

role is the role of the environment

One of the following:
"ENVIRONMENT_ROLE_UNSPECIFIED"
"ENVIRONMENT_ROLE_DEFAULT"
"ENVIRONMENT_ROLE_PREBUILD"
"ENVIRONMENT_ROLE_WORKFLOW"
runnerId?: string

Runner is the ID of the runner that runs this environment.

spec?: EnvironmentSpec { admission, automationsFile, content, 10 more }

Spec is the configuration of the environment that’s required for the runner to start the environment

admission?: AdmissionLevel

admission controlls who can access the environment and its ports.

One of the following:
"ADMISSION_LEVEL_UNSPECIFIED"
"ADMISSION_LEVEL_OWNER_ONLY"
"ADMISSION_LEVEL_EVERYONE"
"ADMISSION_LEVEL_ORGANIZATION"
"ADMISSION_LEVEL_CREATOR_ONLY"
automationsFile?: AutomationsFile { automationsFilePath, session, triggerFilter }

automations_file is the automations file spec of the environment

automationsFilePath?: string

automations_file_path is the path to the automations file that is applied in the environment, relative to the repo root. path must not be absolute (start with a /):

this.matches('^$|^[^/].*')
session?: string
triggerFilter?: Array<AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more } >

trigger_filter specifies which automation triggers should execute. When set, only automations matching these triggers will run. If empty/unset, all triggers are evaluated normally.

beforeSnapshot?: boolean
manual?: boolean
postDevcontainerStart?: boolean
postEnvironmentStart?: boolean
postMachineStart?: boolean
prebuild?: boolean
content?: Content { gitEmail, gitUsername, initializer, session }

content is the content spec of the environment

gitEmail?: string

The Git email address

gitUsername?: string

The Git username

initializer?: EnvironmentInitializer { specs }

initializer configures how the environment is to be initialized

specs?: Array<Spec>
contextUrl?: ContextURL { url }
url?: string

url is the URL from which the environment is created

formaturi
git?: Git { checkoutLocation, cloneTarget, remoteUri, 2 more }
checkoutLocation?: string

a path relative to the environment root in which the code will be checked out to

cloneTarget?: string

the value for the clone target mode - use depends on the target mode

remoteUri?: string

remote_uri is the Git remote origin

targetMode?: "CLONE_TARGET_MODE_UNSPECIFIED" | "CLONE_TARGET_MODE_REMOTE_HEAD" | "CLONE_TARGET_MODE_REMOTE_COMMIT" | 3 more

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstreamRemoteUri?: string

upstream_Remote_uri is the fork upstream of a repository

session?: string
desiredPhase?: EnvironmentPhase

Phase is the desired phase of the environment

One of the following:
"ENVIRONMENT_PHASE_UNSPECIFIED"
"ENVIRONMENT_PHASE_CREATING"
"ENVIRONMENT_PHASE_STARTING"
"ENVIRONMENT_PHASE_RUNNING"
"ENVIRONMENT_PHASE_UPDATING"
"ENVIRONMENT_PHASE_STOPPING"
"ENVIRONMENT_PHASE_STOPPED"
"ENVIRONMENT_PHASE_DELETING"
"ENVIRONMENT_PHASE_DELETED"
devcontainer?: Devcontainer { defaultDevcontainerImage, devcontainerFilePath, dotfiles, 2 more }

devcontainer is the devcontainer spec of the environment

defaultDevcontainerImage?: string

default_devcontainer_image is the default image that is used to start the devcontainer if no devcontainer config file is found

devcontainerFilePath?: string

devcontainer_file_path is the path to the devcontainer file relative to the repo root path must not be absolute (start with a /):

this.matches('^$|^[^/].*')
dotfiles?: Dotfiles { repository }

Experimental: dotfiles is the dotfiles configuration of the devcontainer

repository: string

URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)

formaturi
lifecycleStage?: "LIFECYCLE_STAGE_UNSPECIFIED" | "LIFECYCLE_STAGE_FULL" | "LIFECYCLE_STAGE_PREBUILD"

lifecycle_stage controls which devcontainer lifecycle commands are executed. Defaults to FULL if not specified.

One of the following:
"LIFECYCLE_STAGE_UNSPECIFIED"
"LIFECYCLE_STAGE_FULL"
"LIFECYCLE_STAGE_PREBUILD"
session?: string
kernelControlsConfig?: KernelControlsConfig { veto }

kernel_controls_config configures kernel-level controls for this environment

veto?: Veto { exec }

veto controls blocking mechanisms

exec?: Exec { action, denylist, enabled }

exec controls executable blocking

action specifies what action kernel-level controls take on policy violations

One of the following:
"KERNEL_CONTROLS_ACTION_UNSPECIFIED"
"KERNEL_CONTROLS_ACTION_BLOCK"
"KERNEL_CONTROLS_ACTION_AUDIT"
denylist?: Array<string>

denylist is the list of executable paths or names to block

enabled?: boolean

enabled controls whether executable blocking is active

machine?: Machine { class, session }

machine is the machine spec of the environment

class?: string

Class denotes the class of the environment we ought to start

session?: string
ports?: Array<Port>

ports is the set of ports which ought to be exposed to your network

admission?: AdmissionLevel

policy of this port

One of the following:
"ADMISSION_LEVEL_UNSPECIFIED"
"ADMISSION_LEVEL_OWNER_ONLY"
"ADMISSION_LEVEL_EVERYONE"
"ADMISSION_LEVEL_ORGANIZATION"
"ADMISSION_LEVEL_CREATOR_ONLY"
name?: string

name of this port

maxLength100
minLength1
port?: number

port number

formatint32
maximum65535
minimum1024
protocol?: "PROTOCOL_UNSPECIFIED" | "PROTOCOL_HTTP" | "PROTOCOL_HTTPS"

protocol for communication (Gateway proxy → user environment service). this setting only affects the protocol used between Gateway and user environment services.

One of the following:
"PROTOCOL_UNSPECIFIED"
"PROTOCOL_HTTP"
"PROTOCOL_HTTPS"
secrets?: Array<Secret>

secrets are confidential data that is mounted into the environment

id?: string

id is the unique identifier of the secret.

apiOnly?: boolean

api_only indicates the secret is only available via API/CLI. These secrets are resolved but NOT automatically injected into services or devcontainers.

containerRegistryBasicAuthHost?: string

container_registry_basic_auth_host is the hostname of the container registry that supports basic auth

credentialProxy?: CredentialProxy { format, header, targetHosts }

credential_proxy configures transparent credential injection via the credential proxy. When set, the credential proxy intercepts HTTPS traffic to the target hosts and replaces the dummy secret value with the real value in the specified HTTP header. The real secret value is never exposed in the environment. This field is orthogonal to mount — a secret can be both mounted (e.g. as a git credential) and proxied at the same time.

format?: "FORMAT_UNSPECIFIED" | "FORMAT_PLAIN" | "FORMAT_BASE64"

format describes how the secret value is encoded. The proxy uses this to decode the value before injecting it into the header.

One of the following:
"FORMAT_UNSPECIFIED"
"FORMAT_PLAIN"
"FORMAT_BASE64"
header?: string

header is the HTTP header name to inject (e.g. “Authorization”).

targetHosts?: Array<string>

target_hosts lists the hostnames to intercept (for example “github.com” or “*.github.com”). Wildcards are subdomain-only and do not match the apex domain.

environmentVariable?: string
filePath?: string

file_path is the path inside the devcontainer where the secret is mounted

gitCredentialHost?: string
name?: string

name is the human readable description of the secret

scope?: "SCOPE_UNSPECIFIED" | "SCOPE_ORGANIZATION" | "SCOPE_PROJECT" | 3 more

scope indicates where this secret originated from. Used to filter secrets during build (only org and project secrets are injected).

One of the following:
"SCOPE_UNSPECIFIED"
"SCOPE_ORGANIZATION"
"SCOPE_PROJECT"
"SCOPE_USER"
"SCOPE_SERVICE_ACCOUNT"
"SCOPE_RUNNER"
session?: string

session indicated the current session of the secret. When the session does not change, secrets are not reloaded in the environment.

source?: string

source is the source of the secret, for now control-plane or runner

sourceRef?: string

source_ref into the source, in case of control-plane this is uuid of the secret

specVersion?: string

version of the spec. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.spec_version < b.spec_version then a was the spec before b.

sshPublicKeys?: Array<SSHPublicKey>

ssh_public_keys are the public keys used to ssh into the environment

id?: string

id is the unique identifier of the public key

value?: string

value is the actual public key in the public key file format

timeout?: Timeout { disconnected }

Timeout configures the environment timeout

disconnected?: string

inacitivity is the maximum time of disconnection before the environment is stopped or paused. Minimum duration is 30 minutes. Set to 0 to disable. value must be 0s (disabled) or at least 1800s (30 minutes):

this == duration('0s') || this >= duration('1800s')
formatregex
workflowActionId?: string | null

workflow_action_id is an optional reference to the workflow execution action that created this environment. Used for tracking and event correlation.

formatuuid
status?: EnvironmentStatus { activitySignal, automationsFile, content, 10 more }

Status is the current status of the environment

activitySignal?: EnvironmentActivitySignal { source, timestamp }

activity_signal is the last activity signal for the environment.

source?: string

source of the activity signal, such as “VS Code”, “SSH”, or “Automations”. It should be a human-readable string that describes the source of the activity signal.

maxLength80
minLength3
timestamp?: string

timestamp of when the activity was observed by the source. Only reported every 5 minutes. Zero value means no activity was observed.

formatdate-time
automationsFile?: AutomationsFile { automationsFilePath, automationsFilePresence, failureMessage, 3 more }

automations_file contains the status of the automations file.

automationsFilePath?: string

automations_file_path is the path to the automations file relative to the repo root.

automationsFilePresence?: "PRESENCE_UNSPECIFIED" | "PRESENCE_ABSENT" | "PRESENCE_DISCOVERED" | "PRESENCE_SPECIFIED"

automations_file_presence indicates how an automations file is present in the environment.

One of the following:
"PRESENCE_UNSPECIFIED"
"PRESENCE_ABSENT"
"PRESENCE_DISCOVERED"
"PRESENCE_SPECIFIED"
failureMessage?: string

failure_message contains the reason the automations file failed to be applied. This is only set if the phase is FAILED.

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the automations file.

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
session?: string

session is the automations file session that is currently applied in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when no triggers are defined in the automations file.

content?: Content { contentLocationInMachine, failureMessage, git, 3 more }

content contains the status of the environment content.

contentLocationInMachine?: string

content_location_in_machine is the location of the content in the machine

failureMessage?: string

failure_message contains the reason the content initialization failed.

git?: Git { branch, changedFiles, cloneUrl, 4 more }

git is the Git working copy status of the environment. Note: this is a best-effort field and more often than not will not be present. Its absence does not indicate the absence of a working copy.

branch?: string

branch is branch we’re currently on

changedFiles?: Array<ChangedFile>

changed_files is an array of changed files in the environment, possibly truncated

changeType?: "CHANGE_TYPE_UNSPECIFIED" | "CHANGE_TYPE_ADDED" | "CHANGE_TYPE_MODIFIED" | 5 more

ChangeType is the type of change that happened to the file

One of the following:
"CHANGE_TYPE_UNSPECIFIED"
"CHANGE_TYPE_ADDED"
"CHANGE_TYPE_MODIFIED"
"CHANGE_TYPE_DELETED"
"CHANGE_TYPE_RENAMED"
"CHANGE_TYPE_COPIED"
"CHANGE_TYPE_UPDATED_BUT_UNMERGED"
"CHANGE_TYPE_UNTRACKED"
oldPath?: string

old_path is the previous path of the file before a rename or copy. Only set when change_type is RENAMED or COPIED.

maxLength255
path?: string

path is the path of the file

maxLength255
cloneUrl?: string

clone_url is the repository url as you would pass it to “git clone”. Only HTTPS clone URLs are supported.

latestCommit?: string

latest_commit is the most recent commit on the current branch

totalChangedFiles?: number
formatint32
totalUnpushedCommits?: number

the total number of unpushed changes

formatint32
unpushedCommits?: Array<string>

unpushed_commits is an array of unpushed changes in the environment, possibly truncated

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the environment content

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
session?: string

session is the session that is currently active in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when the content is present but not in the expected state.

devcontainer?: Devcontainer { containerId, containerName, devcontainerconfigInSync, 9 more }

devcontainer contains the status of the devcontainer.

containerId?: string

container_id is the ID of the container.

containerName?: string

container_name is the name of the container that is used to connect to the devcontainer

devcontainerconfigInSync?: boolean

devcontainerconfig_in_sync indicates if the devcontainer is up to date w.r.t. the devcontainer config file.

devcontainerFilePath?: string

devcontainer_file_path is the path to the devcontainer file relative to the repo root

devcontainerFilePresence?: "PRESENCE_UNSPECIFIED" | "PRESENCE_GENERATED" | "PRESENCE_DISCOVERED" | "PRESENCE_SPECIFIED"

devcontainer_file_presence indicates how the devcontainer file is present in the repo.

One of the following:
"PRESENCE_UNSPECIFIED"
"PRESENCE_GENERATED"
"PRESENCE_DISCOVERED"
"PRESENCE_SPECIFIED"
failureMessage?: string

failure_message contains the reason the devcontainer failed to operate.

phase?: "PHASE_UNSPECIFIED" | "PHASE_CREATING" | "PHASE_RUNNING" | 2 more

phase is the current phase of the devcontainer

One of the following:
"PHASE_UNSPECIFIED"
"PHASE_CREATING"
"PHASE_RUNNING"
"PHASE_STOPPED"
"PHASE_FAILED"
remoteUser?: string

remote_user is the user that is used to connect to the devcontainer

remoteWorkspaceFolder?: string

remote_workspace_folder is the folder that is used to connect to the devcontainer

secretsInSync?: boolean

secrets_in_sync indicates if the secrets are up to date w.r.t. the running devcontainer.

session?: string

session is the session that is currently active in the devcontainer.

warningMessage?: string

warning_message contains warnings, e.g. when the devcontainer is present but not in the expected state.

environmentUrls?: EnvironmentURLs { logs, ops, ports, 2 more }

environment_url contains the URL at which the environment can be accessed. This field is only set if the environment is running.

logs?: string

logs is the URL at which the environment logs can be accessed.

ops?: string

ops is the URL at which the environment ops service can be accessed.

ports?: Array<Port>
port?: number

port is the port number of the environment port

formatint32
maximum65535
minimum1024
url?: string

url is the URL at which the environment port can be accessed

ssh?: SSH { url }

SSH is the URL at which the environment can be accessed via SSH.

url?: string
supportBundle?: string

support_bundle is the URL at which the environment support bundle can be accessed.

failureMessage?: Array<string>

failure_message summarises why the environment failed to operate. If this is non-empty the environment has failed to operate and will likely transition to a stopped state.

machine?: Machine { failureMessage, phase, session, 3 more }

machine contains the status of the environment machine

failureMessage?: string

failure_message contains the reason the machine failed to operate.

phase?: "PHASE_UNSPECIFIED" | "PHASE_CREATING" | "PHASE_STARTING" | 5 more

phase is the current phase of the environment machine

One of the following:
"PHASE_UNSPECIFIED"
"PHASE_CREATING"
"PHASE_STARTING"
"PHASE_RUNNING"
"PHASE_STOPPING"
"PHASE_STOPPED"
"PHASE_DELETING"
"PHASE_DELETED"
session?: string

session is the session that is currently active in the machine.

timeout?: string

timeout contains the reason the environment has timed out. If this field is empty, the environment has not timed out.

versions?: Versions { amiId, supervisorCommit, supervisorVersion }

versions contains the versions of components in the machine.

amiId?: string
supervisorCommit?: string
supervisorVersion?: string
warningMessage?: string

warning_message contains warnings, e.g. when the machine is present but not in the expected state.

the phase of an environment is a simple, high-level summary of where the environment is in its lifecycle

One of the following:
"ENVIRONMENT_PHASE_UNSPECIFIED"
"ENVIRONMENT_PHASE_CREATING"
"ENVIRONMENT_PHASE_STARTING"
"ENVIRONMENT_PHASE_RUNNING"
"ENVIRONMENT_PHASE_UPDATING"
"ENVIRONMENT_PHASE_STOPPING"
"ENVIRONMENT_PHASE_STOPPED"
"ENVIRONMENT_PHASE_DELETING"
"ENVIRONMENT_PHASE_DELETED"
runnerAck?: RunnerAck { message, specVersion, statusCode }

runner_ack contains the acknowledgement from the runner that is has received the environment spec.

message?: string
specVersion?: string
statusCode?: "STATUS_CODE_UNSPECIFIED" | "STATUS_CODE_OK" | "STATUS_CODE_INVALID_RESOURCE" | "STATUS_CODE_FAILED_PRECONDITION"
One of the following:
"STATUS_CODE_UNSPECIFIED"
"STATUS_CODE_OK"
"STATUS_CODE_INVALID_RESOURCE"
"STATUS_CODE_FAILED_PRECONDITION"
secrets?: Array<Secret>

secrets contains the status of the environment secrets

id?: string

id is the unique identifier of the secret.

failureMessage?: string

failure_message contains the reason the secret failed to be materialize.

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more
One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
secretName?: string
session?: string

session is the session that is currently active in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when the secret is present but not in the expected state.

sshPublicKeys?: Array<SSHPublicKey>

ssh_public_keys contains the status of the environment ssh public keys

id?: string

id is the unique identifier of the public key

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the public key

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
statusVersion?: string

version of the status update. Environment instances themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

warningMessage?: Array<string>

warning_message contains warnings, e.g. when the environment is present but not in the expected state.

EnvironmentCreateLogsTokenResponse { accessToken }
accessToken: string

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

EnvironmentDeleteResponse = unknown
EnvironmentMarkActiveResponse = unknown
EnvironmentRetrieveResponse { environment }
environment: Environment { id, metadata, spec, status }

+resource get environment

id: string

ID is a unique identifier of this environment. No other environment with the same name must be managed by this environment manager

metadata?: EnvironmentMetadata { annotations, archivedAt, createdAt, 10 more }

Metadata is data associated with this environment that’s required for other parts of Gitpod to function

annotations?: Record<string, string>

annotations are key/value pairs that gets attached to the environment. +internal - not yet implemented

archivedAt?: string

Time when the Environment was archived. If not set, the environment is not archived.

formatdate-time
createdAt?: string

Time when the Environment was created.

formatdate-time
creator?: Subject { id, principal }

creator is the identity of the creator of the environment

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
lastStartedAt?: string

Time when the Environment was last started (i.e. CreateEnvironment or StartEnvironment were called).

formatdate-time
lockdownAt?: string

lockdown_at is the time at which the environment becomes locked down due to the organization’s maximum environment lifetime policy. Nil when no lifetime policy applies.

formatdate-time
name?: string

name is the name of the environment as specified by the user

maxLength80
organizationId?: string

organization_id is the ID of the organization that contains the environment

formatuuid
originalContextUrl?: string

original_context_url is the normalized URL from which the environment was created

prebuildId?: string | null

prebuild_id is the ID of the prebuild this environment was created from. Only set if the environment was created from a prebuild.

formatuuid
projectId?: string

If the Environment was started from a project, the project_id will reference the project.

role is the role of the environment

One of the following:
"ENVIRONMENT_ROLE_UNSPECIFIED"
"ENVIRONMENT_ROLE_DEFAULT"
"ENVIRONMENT_ROLE_PREBUILD"
"ENVIRONMENT_ROLE_WORKFLOW"
runnerId?: string

Runner is the ID of the runner that runs this environment.

spec?: EnvironmentSpec { admission, automationsFile, content, 10 more }

Spec is the configuration of the environment that’s required for the runner to start the environment

admission?: AdmissionLevel

admission controlls who can access the environment and its ports.

One of the following:
"ADMISSION_LEVEL_UNSPECIFIED"
"ADMISSION_LEVEL_OWNER_ONLY"
"ADMISSION_LEVEL_EVERYONE"
"ADMISSION_LEVEL_ORGANIZATION"
"ADMISSION_LEVEL_CREATOR_ONLY"
automationsFile?: AutomationsFile { automationsFilePath, session, triggerFilter }

automations_file is the automations file spec of the environment

automationsFilePath?: string

automations_file_path is the path to the automations file that is applied in the environment, relative to the repo root. path must not be absolute (start with a /):

this.matches('^$|^[^/].*')
session?: string
triggerFilter?: Array<AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more } >

trigger_filter specifies which automation triggers should execute. When set, only automations matching these triggers will run. If empty/unset, all triggers are evaluated normally.

beforeSnapshot?: boolean
manual?: boolean
postDevcontainerStart?: boolean
postEnvironmentStart?: boolean
postMachineStart?: boolean
prebuild?: boolean
content?: Content { gitEmail, gitUsername, initializer, session }

content is the content spec of the environment

gitEmail?: string

The Git email address

gitUsername?: string

The Git username

initializer?: EnvironmentInitializer { specs }

initializer configures how the environment is to be initialized

specs?: Array<Spec>
contextUrl?: ContextURL { url }
url?: string

url is the URL from which the environment is created

formaturi
git?: Git { checkoutLocation, cloneTarget, remoteUri, 2 more }
checkoutLocation?: string

a path relative to the environment root in which the code will be checked out to

cloneTarget?: string

the value for the clone target mode - use depends on the target mode

remoteUri?: string

remote_uri is the Git remote origin

targetMode?: "CLONE_TARGET_MODE_UNSPECIFIED" | "CLONE_TARGET_MODE_REMOTE_HEAD" | "CLONE_TARGET_MODE_REMOTE_COMMIT" | 3 more

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstreamRemoteUri?: string

upstream_Remote_uri is the fork upstream of a repository

session?: string
desiredPhase?: EnvironmentPhase

Phase is the desired phase of the environment

One of the following:
"ENVIRONMENT_PHASE_UNSPECIFIED"
"ENVIRONMENT_PHASE_CREATING"
"ENVIRONMENT_PHASE_STARTING"
"ENVIRONMENT_PHASE_RUNNING"
"ENVIRONMENT_PHASE_UPDATING"
"ENVIRONMENT_PHASE_STOPPING"
"ENVIRONMENT_PHASE_STOPPED"
"ENVIRONMENT_PHASE_DELETING"
"ENVIRONMENT_PHASE_DELETED"
devcontainer?: Devcontainer { defaultDevcontainerImage, devcontainerFilePath, dotfiles, 2 more }

devcontainer is the devcontainer spec of the environment

defaultDevcontainerImage?: string

default_devcontainer_image is the default image that is used to start the devcontainer if no devcontainer config file is found

devcontainerFilePath?: string

devcontainer_file_path is the path to the devcontainer file relative to the repo root path must not be absolute (start with a /):

this.matches('^$|^[^/].*')
dotfiles?: Dotfiles { repository }

Experimental: dotfiles is the dotfiles configuration of the devcontainer

repository: string

URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)

formaturi
lifecycleStage?: "LIFECYCLE_STAGE_UNSPECIFIED" | "LIFECYCLE_STAGE_FULL" | "LIFECYCLE_STAGE_PREBUILD"

lifecycle_stage controls which devcontainer lifecycle commands are executed. Defaults to FULL if not specified.

One of the following:
"LIFECYCLE_STAGE_UNSPECIFIED"
"LIFECYCLE_STAGE_FULL"
"LIFECYCLE_STAGE_PREBUILD"
session?: string
kernelControlsConfig?: KernelControlsConfig { veto }

kernel_controls_config configures kernel-level controls for this environment

veto?: Veto { exec }

veto controls blocking mechanisms

exec?: Exec { action, denylist, enabled }

exec controls executable blocking

action specifies what action kernel-level controls take on policy violations

One of the following:
"KERNEL_CONTROLS_ACTION_UNSPECIFIED"
"KERNEL_CONTROLS_ACTION_BLOCK"
"KERNEL_CONTROLS_ACTION_AUDIT"
denylist?: Array<string>

denylist is the list of executable paths or names to block

enabled?: boolean

enabled controls whether executable blocking is active

machine?: Machine { class, session }

machine is the machine spec of the environment

class?: string

Class denotes the class of the environment we ought to start

session?: string
ports?: Array<Port>

ports is the set of ports which ought to be exposed to your network

admission?: AdmissionLevel

policy of this port

One of the following:
"ADMISSION_LEVEL_UNSPECIFIED"
"ADMISSION_LEVEL_OWNER_ONLY"
"ADMISSION_LEVEL_EVERYONE"
"ADMISSION_LEVEL_ORGANIZATION"
"ADMISSION_LEVEL_CREATOR_ONLY"
name?: string

name of this port

maxLength100
minLength1
port?: number

port number

formatint32
maximum65535
minimum1024
protocol?: "PROTOCOL_UNSPECIFIED" | "PROTOCOL_HTTP" | "PROTOCOL_HTTPS"

protocol for communication (Gateway proxy → user environment service). this setting only affects the protocol used between Gateway and user environment services.

One of the following:
"PROTOCOL_UNSPECIFIED"
"PROTOCOL_HTTP"
"PROTOCOL_HTTPS"
secrets?: Array<Secret>

secrets are confidential data that is mounted into the environment

id?: string

id is the unique identifier of the secret.

apiOnly?: boolean

api_only indicates the secret is only available via API/CLI. These secrets are resolved but NOT automatically injected into services or devcontainers.

containerRegistryBasicAuthHost?: string

container_registry_basic_auth_host is the hostname of the container registry that supports basic auth

credentialProxy?: CredentialProxy { format, header, targetHosts }

credential_proxy configures transparent credential injection via the credential proxy. When set, the credential proxy intercepts HTTPS traffic to the target hosts and replaces the dummy secret value with the real value in the specified HTTP header. The real secret value is never exposed in the environment. This field is orthogonal to mount — a secret can be both mounted (e.g. as a git credential) and proxied at the same time.

format?: "FORMAT_UNSPECIFIED" | "FORMAT_PLAIN" | "FORMAT_BASE64"

format describes how the secret value is encoded. The proxy uses this to decode the value before injecting it into the header.

One of the following:
"FORMAT_UNSPECIFIED"
"FORMAT_PLAIN"
"FORMAT_BASE64"
header?: string

header is the HTTP header name to inject (e.g. “Authorization”).

targetHosts?: Array<string>

target_hosts lists the hostnames to intercept (for example “github.com” or “*.github.com”). Wildcards are subdomain-only and do not match the apex domain.

environmentVariable?: string
filePath?: string

file_path is the path inside the devcontainer where the secret is mounted

gitCredentialHost?: string
name?: string

name is the human readable description of the secret

scope?: "SCOPE_UNSPECIFIED" | "SCOPE_ORGANIZATION" | "SCOPE_PROJECT" | 3 more

scope indicates where this secret originated from. Used to filter secrets during build (only org and project secrets are injected).

One of the following:
"SCOPE_UNSPECIFIED"
"SCOPE_ORGANIZATION"
"SCOPE_PROJECT"
"SCOPE_USER"
"SCOPE_SERVICE_ACCOUNT"
"SCOPE_RUNNER"
session?: string

session indicated the current session of the secret. When the session does not change, secrets are not reloaded in the environment.

source?: string

source is the source of the secret, for now control-plane or runner

sourceRef?: string

source_ref into the source, in case of control-plane this is uuid of the secret

specVersion?: string

version of the spec. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.spec_version < b.spec_version then a was the spec before b.

sshPublicKeys?: Array<SSHPublicKey>

ssh_public_keys are the public keys used to ssh into the environment

id?: string

id is the unique identifier of the public key

value?: string

value is the actual public key in the public key file format

timeout?: Timeout { disconnected }

Timeout configures the environment timeout

disconnected?: string

inacitivity is the maximum time of disconnection before the environment is stopped or paused. Minimum duration is 30 minutes. Set to 0 to disable. value must be 0s (disabled) or at least 1800s (30 minutes):

this == duration('0s') || this >= duration('1800s')
formatregex
workflowActionId?: string | null

workflow_action_id is an optional reference to the workflow execution action that created this environment. Used for tracking and event correlation.

formatuuid
status?: EnvironmentStatus { activitySignal, automationsFile, content, 10 more }

Status is the current status of the environment

activitySignal?: EnvironmentActivitySignal { source, timestamp }

activity_signal is the last activity signal for the environment.

source?: string

source of the activity signal, such as “VS Code”, “SSH”, or “Automations”. It should be a human-readable string that describes the source of the activity signal.

maxLength80
minLength3
timestamp?: string

timestamp of when the activity was observed by the source. Only reported every 5 minutes. Zero value means no activity was observed.

formatdate-time
automationsFile?: AutomationsFile { automationsFilePath, automationsFilePresence, failureMessage, 3 more }

automations_file contains the status of the automations file.

automationsFilePath?: string

automations_file_path is the path to the automations file relative to the repo root.

automationsFilePresence?: "PRESENCE_UNSPECIFIED" | "PRESENCE_ABSENT" | "PRESENCE_DISCOVERED" | "PRESENCE_SPECIFIED"

automations_file_presence indicates how an automations file is present in the environment.

One of the following:
"PRESENCE_UNSPECIFIED"
"PRESENCE_ABSENT"
"PRESENCE_DISCOVERED"
"PRESENCE_SPECIFIED"
failureMessage?: string

failure_message contains the reason the automations file failed to be applied. This is only set if the phase is FAILED.

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the automations file.

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
session?: string

session is the automations file session that is currently applied in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when no triggers are defined in the automations file.

content?: Content { contentLocationInMachine, failureMessage, git, 3 more }

content contains the status of the environment content.

contentLocationInMachine?: string

content_location_in_machine is the location of the content in the machine

failureMessage?: string

failure_message contains the reason the content initialization failed.

git?: Git { branch, changedFiles, cloneUrl, 4 more }

git is the Git working copy status of the environment. Note: this is a best-effort field and more often than not will not be present. Its absence does not indicate the absence of a working copy.

branch?: string

branch is branch we’re currently on

changedFiles?: Array<ChangedFile>

changed_files is an array of changed files in the environment, possibly truncated

changeType?: "CHANGE_TYPE_UNSPECIFIED" | "CHANGE_TYPE_ADDED" | "CHANGE_TYPE_MODIFIED" | 5 more

ChangeType is the type of change that happened to the file

One of the following:
"CHANGE_TYPE_UNSPECIFIED"
"CHANGE_TYPE_ADDED"
"CHANGE_TYPE_MODIFIED"
"CHANGE_TYPE_DELETED"
"CHANGE_TYPE_RENAMED"
"CHANGE_TYPE_COPIED"
"CHANGE_TYPE_UPDATED_BUT_UNMERGED"
"CHANGE_TYPE_UNTRACKED"
oldPath?: string

old_path is the previous path of the file before a rename or copy. Only set when change_type is RENAMED or COPIED.

maxLength255
path?: string

path is the path of the file

maxLength255
cloneUrl?: string

clone_url is the repository url as you would pass it to “git clone”. Only HTTPS clone URLs are supported.

latestCommit?: string

latest_commit is the most recent commit on the current branch

totalChangedFiles?: number
formatint32
totalUnpushedCommits?: number

the total number of unpushed changes

formatint32
unpushedCommits?: Array<string>

unpushed_commits is an array of unpushed changes in the environment, possibly truncated

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the environment content

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
session?: string

session is the session that is currently active in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when the content is present but not in the expected state.

devcontainer?: Devcontainer { containerId, containerName, devcontainerconfigInSync, 9 more }

devcontainer contains the status of the devcontainer.

containerId?: string

container_id is the ID of the container.

containerName?: string

container_name is the name of the container that is used to connect to the devcontainer

devcontainerconfigInSync?: boolean

devcontainerconfig_in_sync indicates if the devcontainer is up to date w.r.t. the devcontainer config file.

devcontainerFilePath?: string

devcontainer_file_path is the path to the devcontainer file relative to the repo root

devcontainerFilePresence?: "PRESENCE_UNSPECIFIED" | "PRESENCE_GENERATED" | "PRESENCE_DISCOVERED" | "PRESENCE_SPECIFIED"

devcontainer_file_presence indicates how the devcontainer file is present in the repo.

One of the following:
"PRESENCE_UNSPECIFIED"
"PRESENCE_GENERATED"
"PRESENCE_DISCOVERED"
"PRESENCE_SPECIFIED"
failureMessage?: string

failure_message contains the reason the devcontainer failed to operate.

phase?: "PHASE_UNSPECIFIED" | "PHASE_CREATING" | "PHASE_RUNNING" | 2 more

phase is the current phase of the devcontainer

One of the following:
"PHASE_UNSPECIFIED"
"PHASE_CREATING"
"PHASE_RUNNING"
"PHASE_STOPPED"
"PHASE_FAILED"
remoteUser?: string

remote_user is the user that is used to connect to the devcontainer

remoteWorkspaceFolder?: string

remote_workspace_folder is the folder that is used to connect to the devcontainer

secretsInSync?: boolean

secrets_in_sync indicates if the secrets are up to date w.r.t. the running devcontainer.

session?: string

session is the session that is currently active in the devcontainer.

warningMessage?: string

warning_message contains warnings, e.g. when the devcontainer is present but not in the expected state.

environmentUrls?: EnvironmentURLs { logs, ops, ports, 2 more }

environment_url contains the URL at which the environment can be accessed. This field is only set if the environment is running.

logs?: string

logs is the URL at which the environment logs can be accessed.

ops?: string

ops is the URL at which the environment ops service can be accessed.

ports?: Array<Port>
port?: number

port is the port number of the environment port

formatint32
maximum65535
minimum1024
url?: string

url is the URL at which the environment port can be accessed

ssh?: SSH { url }

SSH is the URL at which the environment can be accessed via SSH.

url?: string
supportBundle?: string

support_bundle is the URL at which the environment support bundle can be accessed.

failureMessage?: Array<string>

failure_message summarises why the environment failed to operate. If this is non-empty the environment has failed to operate and will likely transition to a stopped state.

machine?: Machine { failureMessage, phase, session, 3 more }

machine contains the status of the environment machine

failureMessage?: string

failure_message contains the reason the machine failed to operate.

phase?: "PHASE_UNSPECIFIED" | "PHASE_CREATING" | "PHASE_STARTING" | 5 more

phase is the current phase of the environment machine

One of the following:
"PHASE_UNSPECIFIED"
"PHASE_CREATING"
"PHASE_STARTING"
"PHASE_RUNNING"
"PHASE_STOPPING"
"PHASE_STOPPED"
"PHASE_DELETING"
"PHASE_DELETED"
session?: string

session is the session that is currently active in the machine.

timeout?: string

timeout contains the reason the environment has timed out. If this field is empty, the environment has not timed out.

versions?: Versions { amiId, supervisorCommit, supervisorVersion }

versions contains the versions of components in the machine.

amiId?: string
supervisorCommit?: string
supervisorVersion?: string
warningMessage?: string

warning_message contains warnings, e.g. when the machine is present but not in the expected state.

the phase of an environment is a simple, high-level summary of where the environment is in its lifecycle

One of the following:
"ENVIRONMENT_PHASE_UNSPECIFIED"
"ENVIRONMENT_PHASE_CREATING"
"ENVIRONMENT_PHASE_STARTING"
"ENVIRONMENT_PHASE_RUNNING"
"ENVIRONMENT_PHASE_UPDATING"
"ENVIRONMENT_PHASE_STOPPING"
"ENVIRONMENT_PHASE_STOPPED"
"ENVIRONMENT_PHASE_DELETING"
"ENVIRONMENT_PHASE_DELETED"
runnerAck?: RunnerAck { message, specVersion, statusCode }

runner_ack contains the acknowledgement from the runner that is has received the environment spec.

message?: string
specVersion?: string
statusCode?: "STATUS_CODE_UNSPECIFIED" | "STATUS_CODE_OK" | "STATUS_CODE_INVALID_RESOURCE" | "STATUS_CODE_FAILED_PRECONDITION"
One of the following:
"STATUS_CODE_UNSPECIFIED"
"STATUS_CODE_OK"
"STATUS_CODE_INVALID_RESOURCE"
"STATUS_CODE_FAILED_PRECONDITION"
secrets?: Array<Secret>

secrets contains the status of the environment secrets

id?: string

id is the unique identifier of the secret.

failureMessage?: string

failure_message contains the reason the secret failed to be materialize.

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more
One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
secretName?: string
session?: string

session is the session that is currently active in the environment.

warningMessage?: string

warning_message contains warnings, e.g. when the secret is present but not in the expected state.

sshPublicKeys?: Array<SSHPublicKey>

ssh_public_keys contains the status of the environment ssh public keys

id?: string

id is the unique identifier of the public key

phase?: "CONTENT_PHASE_UNSPECIFIED" | "CONTENT_PHASE_CREATING" | "CONTENT_PHASE_INITIALIZING" | 4 more

phase is the current phase of the public key

One of the following:
"CONTENT_PHASE_UNSPECIFIED"
"CONTENT_PHASE_CREATING"
"CONTENT_PHASE_INITIALIZING"
"CONTENT_PHASE_READY"
"CONTENT_PHASE_UPDATING"
"CONTENT_PHASE_FAILED"
"CONTENT_PHASE_UNAVAILABLE"
statusVersion?: string

version of the status update. Environment instances themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

warningMessage?: Array<string>

warning_message contains warnings, e.g. when the environment is present but not in the expected state.

EnvironmentStartResponse = unknown
EnvironmentStopResponse = unknown
EnvironmentUnarchiveResponse = unknown
EnvironmentUpdateResponse = unknown

EnvironmentsAutomations

UpsertAutomationsFile
client.environments.automations.upsert(AutomationUpsertParams { automationsFile, environmentId } body, RequestOptionsoptions?): AutomationUpsertResponse { updatedServiceIds, updatedTaskIds }
POST/gitpod.v1.EnvironmentAutomationService/UpsertAutomationsFile
ModelsExpand Collapse
AutomationsFile { services, tasks }

WARN: Do not remove any field here, as it will break reading automation yaml files. We error if there are any unknown fields in the yaml (to ensure the yaml is correct), but would break if we removed any fields. This includes marking a field as “reserved” in the proto file, this will also break reading the yaml.

services?: Record<string, Services>
commands?: Commands { ready, start, stop }
ready?: string

ready is an optional command that is run repeatedly until it exits with a zero exit code. If set, the service will first go into a Starting phase, and then into a Running phase once the ready command exits with a zero exit code.

start?: string

start is the command to start and run the service. If start exits, the service will transition to the following phase:

  • Stopped: if the exit code is 0
  • Failed: if the exit code is not 0 If the stop command is not set, the start command will receive a SIGTERM signal when the service is requested to stop. If it does not exit within 2 minutes, it will receive a SIGKILL signal.
minLength1
stop?: string

stop is an optional command that runs when the service is requested to stop. If set, instead of sending a SIGTERM signal to the start command, the stop command will be run. Once the stop command exits, the start command will receive a SIGKILL signal. If the stop command exits with a non-zero exit code, the service will transition to the Failed phase. If the stop command does not exit within 2 minutes, a SIGKILL signal will be sent to both the start and stop commands.

description?: string
name?: string
minLength1
role?: "" | "default" | "editor" | "ai-agent"
One of the following:
""
"default"
"editor"
"ai-agent"
runsOn?: RunsOn { docker, machine }
docker?: Docker { environment, image }
environment?: Array<string>
image?: string
minLength1
machine?: unknown

Machine runs the service/task directly on the VM/machine level.

triggeredBy?: Array<"manual" | "postEnvironmentStart" | "postDevcontainerStart" | "prebuild">
One of the following:
"manual"
"postEnvironmentStart"
"postDevcontainerStart"
"prebuild"
tasks?: Record<string, Tasks>
command?: string
minLength1
dependsOn?: Array<string>
description?: string
name?: string
minLength1
runsOn?: RunsOn { docker, machine }
docker?: Docker { environment, image }
environment?: Array<string>
image?: string
minLength1
machine?: unknown

Machine runs the service/task directly on the VM/machine level.

triggeredBy?: Array<"manual" | "postEnvironmentStart" | "postDevcontainerStart" | "prebuild">
One of the following:
"manual"
"postEnvironmentStart"
"postDevcontainerStart"
"prebuild"
AutomationUpsertResponse { updatedServiceIds, updatedTaskIds }
updatedServiceIds?: Array<string>
updatedTaskIds?: Array<string>

EnvironmentsAutomationsServices

CreateService
client.environments.automations.services.create(ServiceCreateParams { environmentId, metadata, spec } body, RequestOptionsoptions?): ServiceCreateResponse { service }
POST/gitpod.v1.EnvironmentAutomationService/CreateService
DeleteService
client.environments.automations.services.delete(ServiceDeleteParams { id, force } body, RequestOptionsoptions?): ServiceDeleteResponse
POST/gitpod.v1.EnvironmentAutomationService/DeleteService
ListServices
client.environments.automations.services.list(ServiceListParams { token, pageSize, filter, pagination } params, RequestOptionsoptions?): ServicesPage<Service { id, environmentId, metadata, 2 more } >
POST/gitpod.v1.EnvironmentAutomationService/ListServices
GetService
client.environments.automations.services.retrieve(ServiceRetrieveParams { id } body, RequestOptionsoptions?): ServiceRetrieveResponse { service }
POST/gitpod.v1.EnvironmentAutomationService/GetService
StartService
client.environments.automations.services.start(ServiceStartParams { id } body, RequestOptionsoptions?): ServiceStartResponse
POST/gitpod.v1.EnvironmentAutomationService/StartService
StopService
client.environments.automations.services.stop(ServiceStopParams { id } body, RequestOptionsoptions?): ServiceStopResponse
POST/gitpod.v1.EnvironmentAutomationService/StopService
UpdateService
client.environments.automations.services.update(ServiceUpdateParams { id, metadata, spec, status } body, RequestOptionsoptions?): ServiceUpdateResponse
POST/gitpod.v1.EnvironmentAutomationService/UpdateService
ModelsExpand Collapse
Service { id, environmentId, metadata, 2 more }
id: string
formatuuid
environmentId?: string
formatuuid
metadata?: ServiceMetadata { createdAt, creator, description, 4 more }
createdAt?: string

created_at is the time the service was created.

formatdate-time
creator?: Subject { id, principal }

creator describes the principal who created the service.

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
description?: string

description is a user-facing description for the service. It can be used to provide context and documentation for the service.

name?: string

name is a user-facing name for the service. Unlike the reference, this field is not unique, and not referenced by the system. This is a short descriptive name for the service.

minLength1
reference?: string

reference is a user-facing identifier for the service which must be unique on the environment. It is used to express dependencies between services, and to identify the service in user interactions (e.g. the CLI).

role specifies the intended role or purpose of the service.

One of the following:
"SERVICE_ROLE_UNSPECIFIED"
"SERVICE_ROLE_DEFAULT"
"SERVICE_ROLE_EDITOR"
"SERVICE_ROLE_AI_AGENT"
"SERVICE_ROLE_SECURITY_AGENT"
triggeredBy?: Array<AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more } >

triggered_by is a list of trigger that start the service.

beforeSnapshot?: boolean
manual?: boolean
postDevcontainerStart?: boolean
postEnvironmentStart?: boolean
postMachineStart?: boolean
prebuild?: boolean
spec?: ServiceSpec { commands, desiredPhase, env, 3 more }
commands?: Commands { ready, start, stop }

commands contains the commands to start, stop and check the readiness of the service

ready?: string

ready is an optional command that is run repeatedly until it exits with a zero exit code. If set, the service will first go into a Starting phase, and then into a Running phase once the ready command exits with a zero exit code.

start?: string

start is the command to start and run the service. If start exits, the service will transition to the following phase:

  • Stopped: if the exit code is 0
  • Failed: if the exit code is not 0 If the stop command is not set, the start command will receive a SIGTERM signal when the service is requested to stop. If it does not exit within 2 minutes, it will receive a SIGKILL signal.
minLength1
stop?: string

stop is an optional command that runs when the service is requested to stop. If set, instead of sending a SIGTERM signal to the start command, the stop command will be run. Once the stop command exits, the start command will receive a SIGKILL signal. If the stop command exits with a non-zero exit code, the service will transition to the Failed phase. If the stop command does not exit within 2 minutes, a SIGKILL signal will be sent to both the start and stop commands.

desiredPhase?: ServicePhase

desired_phase is the phase the service should be in. Used to start or stop the service.

One of the following:
"SERVICE_PHASE_UNSPECIFIED"
"SERVICE_PHASE_STARTING"
"SERVICE_PHASE_RUNNING"
"SERVICE_PHASE_STOPPING"
"SERVICE_PHASE_STOPPED"
"SERVICE_PHASE_FAILED"
"SERVICE_PHASE_DELETED"
env?: Array<EnvironmentVariableItem { name, value, valueFrom } >

env specifies environment variables for the service.

name?: string

name is the environment variable name.

minLength1
value?: string

value is a literal string value.

valueFrom?: EnvironmentVariableSource { secretRef }

value_from specifies a source for the value.

secretRef: SecretRef { id }

secret_ref references a secret by ID.

id?: string

id is the UUID of the secret to reference.

formatuuid
runsOn?: RunsOn { docker, machine }

runs_on specifies the environment the service should run on.

docker?: Docker { environment, image }
environment?: Array<string>
image?: string
minLength1
machine?: unknown

Machine runs the service/task directly on the VM/machine level.

session?: string

session should be changed to trigger a restart of the service. If a service exits it will not be restarted until the session is changed.

specVersion?: string

version of the spec. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.spec_version < b.spec_version then a was the spec before b.

status?: ServiceStatus { failureMessage, logUrl, output, 3 more }
failureMessage?: string

failure_message summarises why the service failed to operate. If this is non-empty the service has failed to operate and will likely transition to a failed state.

logUrl?: string

log_url contains the URL at which the service logs can be accessed.

output?: Record<string, string>

output contains the output of the service. setting an output field to empty string will unset it.

phase?: ServicePhase

phase is the current phase of the service.

One of the following:
"SERVICE_PHASE_UNSPECIFIED"
"SERVICE_PHASE_STARTING"
"SERVICE_PHASE_RUNNING"
"SERVICE_PHASE_STOPPING"
"SERVICE_PHASE_STOPPED"
"SERVICE_PHASE_FAILED"
"SERVICE_PHASE_DELETED"
session?: string

session is the current session of the service.

statusVersion?: string

version of the status update. Service instances themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

ServiceMetadata { createdAt, creator, description, 4 more }
createdAt?: string

created_at is the time the service was created.

formatdate-time
creator?: Subject { id, principal }

creator describes the principal who created the service.

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
description?: string

description is a user-facing description for the service. It can be used to provide context and documentation for the service.

name?: string

name is a user-facing name for the service. Unlike the reference, this field is not unique, and not referenced by the system. This is a short descriptive name for the service.

minLength1
reference?: string

reference is a user-facing identifier for the service which must be unique on the environment. It is used to express dependencies between services, and to identify the service in user interactions (e.g. the CLI).

role specifies the intended role or purpose of the service.

One of the following:
"SERVICE_ROLE_UNSPECIFIED"
"SERVICE_ROLE_DEFAULT"
"SERVICE_ROLE_EDITOR"
"SERVICE_ROLE_AI_AGENT"
"SERVICE_ROLE_SECURITY_AGENT"
triggeredBy?: Array<AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more } >

triggered_by is a list of trigger that start the service.

beforeSnapshot?: boolean
manual?: boolean
postDevcontainerStart?: boolean
postEnvironmentStart?: boolean
postMachineStart?: boolean
prebuild?: boolean
ServicePhase = "SERVICE_PHASE_UNSPECIFIED" | "SERVICE_PHASE_STARTING" | "SERVICE_PHASE_RUNNING" | 4 more
One of the following:
"SERVICE_PHASE_UNSPECIFIED"
"SERVICE_PHASE_STARTING"
"SERVICE_PHASE_RUNNING"
"SERVICE_PHASE_STOPPING"
"SERVICE_PHASE_STOPPED"
"SERVICE_PHASE_FAILED"
"SERVICE_PHASE_DELETED"
ServiceRole = "SERVICE_ROLE_UNSPECIFIED" | "SERVICE_ROLE_DEFAULT" | "SERVICE_ROLE_EDITOR" | 2 more
One of the following:
"SERVICE_ROLE_UNSPECIFIED"
"SERVICE_ROLE_DEFAULT"
"SERVICE_ROLE_EDITOR"
"SERVICE_ROLE_AI_AGENT"
"SERVICE_ROLE_SECURITY_AGENT"
ServiceSpec { commands, desiredPhase, env, 3 more }
commands?: Commands { ready, start, stop }

commands contains the commands to start, stop and check the readiness of the service

ready?: string

ready is an optional command that is run repeatedly until it exits with a zero exit code. If set, the service will first go into a Starting phase, and then into a Running phase once the ready command exits with a zero exit code.

start?: string

start is the command to start and run the service. If start exits, the service will transition to the following phase:

  • Stopped: if the exit code is 0
  • Failed: if the exit code is not 0 If the stop command is not set, the start command will receive a SIGTERM signal when the service is requested to stop. If it does not exit within 2 minutes, it will receive a SIGKILL signal.
minLength1
stop?: string

stop is an optional command that runs when the service is requested to stop. If set, instead of sending a SIGTERM signal to the start command, the stop command will be run. Once the stop command exits, the start command will receive a SIGKILL signal. If the stop command exits with a non-zero exit code, the service will transition to the Failed phase. If the stop command does not exit within 2 minutes, a SIGKILL signal will be sent to both the start and stop commands.

desiredPhase?: ServicePhase

desired_phase is the phase the service should be in. Used to start or stop the service.

One of the following:
"SERVICE_PHASE_UNSPECIFIED"
"SERVICE_PHASE_STARTING"
"SERVICE_PHASE_RUNNING"
"SERVICE_PHASE_STOPPING"
"SERVICE_PHASE_STOPPED"
"SERVICE_PHASE_FAILED"
"SERVICE_PHASE_DELETED"
env?: Array<EnvironmentVariableItem { name, value, valueFrom } >

env specifies environment variables for the service.

name?: string

name is the environment variable name.

minLength1
value?: string

value is a literal string value.

valueFrom?: EnvironmentVariableSource { secretRef }

value_from specifies a source for the value.

secretRef: SecretRef { id }

secret_ref references a secret by ID.

id?: string

id is the UUID of the secret to reference.

formatuuid
runsOn?: RunsOn { docker, machine }

runs_on specifies the environment the service should run on.

docker?: Docker { environment, image }
environment?: Array<string>
image?: string
minLength1
machine?: unknown

Machine runs the service/task directly on the VM/machine level.

session?: string

session should be changed to trigger a restart of the service. If a service exits it will not be restarted until the session is changed.

specVersion?: string

version of the spec. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.spec_version < b.spec_version then a was the spec before b.

ServiceStatus { failureMessage, logUrl, output, 3 more }
failureMessage?: string

failure_message summarises why the service failed to operate. If this is non-empty the service has failed to operate and will likely transition to a failed state.

logUrl?: string

log_url contains the URL at which the service logs can be accessed.

output?: Record<string, string>

output contains the output of the service. setting an output field to empty string will unset it.

phase?: ServicePhase

phase is the current phase of the service.

One of the following:
"SERVICE_PHASE_UNSPECIFIED"
"SERVICE_PHASE_STARTING"
"SERVICE_PHASE_RUNNING"
"SERVICE_PHASE_STOPPING"
"SERVICE_PHASE_STOPPED"
"SERVICE_PHASE_FAILED"
"SERVICE_PHASE_DELETED"
session?: string

session is the current session of the service.

statusVersion?: string

version of the status update. Service instances themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

ServiceCreateResponse { service }
service: Service { id, environmentId, metadata, 2 more }
id: string
formatuuid
environmentId?: string
formatuuid
metadata?: ServiceMetadata { createdAt, creator, description, 4 more }
createdAt?: string

created_at is the time the service was created.

formatdate-time
creator?: Subject { id, principal }

creator describes the principal who created the service.

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
description?: string

description is a user-facing description for the service. It can be used to provide context and documentation for the service.

name?: string

name is a user-facing name for the service. Unlike the reference, this field is not unique, and not referenced by the system. This is a short descriptive name for the service.

minLength1
reference?: string

reference is a user-facing identifier for the service which must be unique on the environment. It is used to express dependencies between services, and to identify the service in user interactions (e.g. the CLI).

role specifies the intended role or purpose of the service.

One of the following:
"SERVICE_ROLE_UNSPECIFIED"
"SERVICE_ROLE_DEFAULT"
"SERVICE_ROLE_EDITOR"
"SERVICE_ROLE_AI_AGENT"
"SERVICE_ROLE_SECURITY_AGENT"
triggeredBy?: Array<AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more } >

triggered_by is a list of trigger that start the service.

beforeSnapshot?: boolean
manual?: boolean
postDevcontainerStart?: boolean
postEnvironmentStart?: boolean
postMachineStart?: boolean
prebuild?: boolean
spec?: ServiceSpec { commands, desiredPhase, env, 3 more }
commands?: Commands { ready, start, stop }

commands contains the commands to start, stop and check the readiness of the service

ready?: string

ready is an optional command that is run repeatedly until it exits with a zero exit code. If set, the service will first go into a Starting phase, and then into a Running phase once the ready command exits with a zero exit code.

start?: string

start is the command to start and run the service. If start exits, the service will transition to the following phase:

  • Stopped: if the exit code is 0
  • Failed: if the exit code is not 0 If the stop command is not set, the start command will receive a SIGTERM signal when the service is requested to stop. If it does not exit within 2 minutes, it will receive a SIGKILL signal.
minLength1
stop?: string

stop is an optional command that runs when the service is requested to stop. If set, instead of sending a SIGTERM signal to the start command, the stop command will be run. Once the stop command exits, the start command will receive a SIGKILL signal. If the stop command exits with a non-zero exit code, the service will transition to the Failed phase. If the stop command does not exit within 2 minutes, a SIGKILL signal will be sent to both the start and stop commands.

desiredPhase?: ServicePhase

desired_phase is the phase the service should be in. Used to start or stop the service.

One of the following:
"SERVICE_PHASE_UNSPECIFIED"
"SERVICE_PHASE_STARTING"
"SERVICE_PHASE_RUNNING"
"SERVICE_PHASE_STOPPING"
"SERVICE_PHASE_STOPPED"
"SERVICE_PHASE_FAILED"
"SERVICE_PHASE_DELETED"
env?: Array<EnvironmentVariableItem { name, value, valueFrom } >

env specifies environment variables for the service.

name?: string

name is the environment variable name.

minLength1
value?: string

value is a literal string value.

valueFrom?: EnvironmentVariableSource { secretRef }

value_from specifies a source for the value.

secretRef: SecretRef { id }

secret_ref references a secret by ID.

id?: string

id is the UUID of the secret to reference.

formatuuid
runsOn?: RunsOn { docker, machine }

runs_on specifies the environment the service should run on.

docker?: Docker { environment, image }
environment?: Array<string>
image?: string
minLength1
machine?: unknown

Machine runs the service/task directly on the VM/machine level.

session?: string

session should be changed to trigger a restart of the service. If a service exits it will not be restarted until the session is changed.

specVersion?: string

version of the spec. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.spec_version < b.spec_version then a was the spec before b.

status?: ServiceStatus { failureMessage, logUrl, output, 3 more }
failureMessage?: string

failure_message summarises why the service failed to operate. If this is non-empty the service has failed to operate and will likely transition to a failed state.

logUrl?: string

log_url contains the URL at which the service logs can be accessed.

output?: Record<string, string>

output contains the output of the service. setting an output field to empty string will unset it.

phase?: ServicePhase

phase is the current phase of the service.

One of the following:
"SERVICE_PHASE_UNSPECIFIED"
"SERVICE_PHASE_STARTING"
"SERVICE_PHASE_RUNNING"
"SERVICE_PHASE_STOPPING"
"SERVICE_PHASE_STOPPED"
"SERVICE_PHASE_FAILED"
"SERVICE_PHASE_DELETED"
session?: string

session is the current session of the service.

statusVersion?: string

version of the status update. Service instances themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

ServiceDeleteResponse = unknown
ServiceRetrieveResponse { service }
service: Service { id, environmentId, metadata, 2 more }
id: string
formatuuid
environmentId?: string
formatuuid
metadata?: ServiceMetadata { createdAt, creator, description, 4 more }
createdAt?: string

created_at is the time the service was created.

formatdate-time
creator?: Subject { id, principal }

creator describes the principal who created the service.

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
description?: string

description is a user-facing description for the service. It can be used to provide context and documentation for the service.

name?: string

name is a user-facing name for the service. Unlike the reference, this field is not unique, and not referenced by the system. This is a short descriptive name for the service.

minLength1
reference?: string

reference is a user-facing identifier for the service which must be unique on the environment. It is used to express dependencies between services, and to identify the service in user interactions (e.g. the CLI).

role specifies the intended role or purpose of the service.

One of the following:
"SERVICE_ROLE_UNSPECIFIED"
"SERVICE_ROLE_DEFAULT"
"SERVICE_ROLE_EDITOR"
"SERVICE_ROLE_AI_AGENT"
"SERVICE_ROLE_SECURITY_AGENT"
triggeredBy?: Array<AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more } >

triggered_by is a list of trigger that start the service.

beforeSnapshot?: boolean
manual?: boolean
postDevcontainerStart?: boolean
postEnvironmentStart?: boolean
postMachineStart?: boolean
prebuild?: boolean
spec?: ServiceSpec { commands, desiredPhase, env, 3 more }
commands?: Commands { ready, start, stop }

commands contains the commands to start, stop and check the readiness of the service

ready?: string

ready is an optional command that is run repeatedly until it exits with a zero exit code. If set, the service will first go into a Starting phase, and then into a Running phase once the ready command exits with a zero exit code.

start?: string

start is the command to start and run the service. If start exits, the service will transition to the following phase:

  • Stopped: if the exit code is 0
  • Failed: if the exit code is not 0 If the stop command is not set, the start command will receive a SIGTERM signal when the service is requested to stop. If it does not exit within 2 minutes, it will receive a SIGKILL signal.
minLength1
stop?: string

stop is an optional command that runs when the service is requested to stop. If set, instead of sending a SIGTERM signal to the start command, the stop command will be run. Once the stop command exits, the start command will receive a SIGKILL signal. If the stop command exits with a non-zero exit code, the service will transition to the Failed phase. If the stop command does not exit within 2 minutes, a SIGKILL signal will be sent to both the start and stop commands.

desiredPhase?: ServicePhase

desired_phase is the phase the service should be in. Used to start or stop the service.

One of the following:
"SERVICE_PHASE_UNSPECIFIED"
"SERVICE_PHASE_STARTING"
"SERVICE_PHASE_RUNNING"
"SERVICE_PHASE_STOPPING"
"SERVICE_PHASE_STOPPED"
"SERVICE_PHASE_FAILED"
"SERVICE_PHASE_DELETED"
env?: Array<EnvironmentVariableItem { name, value, valueFrom } >

env specifies environment variables for the service.

name?: string

name is the environment variable name.

minLength1
value?: string

value is a literal string value.

valueFrom?: EnvironmentVariableSource { secretRef }

value_from specifies a source for the value.

secretRef: SecretRef { id }

secret_ref references a secret by ID.

id?: string

id is the UUID of the secret to reference.

formatuuid
runsOn?: RunsOn { docker, machine }

runs_on specifies the environment the service should run on.

docker?: Docker { environment, image }
environment?: Array<string>
image?: string
minLength1
machine?: unknown

Machine runs the service/task directly on the VM/machine level.

session?: string

session should be changed to trigger a restart of the service. If a service exits it will not be restarted until the session is changed.

specVersion?: string

version of the spec. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.spec_version < b.spec_version then a was the spec before b.

status?: ServiceStatus { failureMessage, logUrl, output, 3 more }
failureMessage?: string

failure_message summarises why the service failed to operate. If this is non-empty the service has failed to operate and will likely transition to a failed state.

logUrl?: string

log_url contains the URL at which the service logs can be accessed.

output?: Record<string, string>

output contains the output of the service. setting an output field to empty string will unset it.

phase?: ServicePhase

phase is the current phase of the service.

One of the following:
"SERVICE_PHASE_UNSPECIFIED"
"SERVICE_PHASE_STARTING"
"SERVICE_PHASE_RUNNING"
"SERVICE_PHASE_STOPPING"
"SERVICE_PHASE_STOPPED"
"SERVICE_PHASE_FAILED"
"SERVICE_PHASE_DELETED"
session?: string

session is the current session of the service.

statusVersion?: string

version of the status update. Service instances themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

ServiceStartResponse = unknown
ServiceStopResponse = unknown
ServiceUpdateResponse = unknown

EnvironmentsAutomationsTasks

CreateTask
client.environments.automations.tasks.create(TaskCreateParams { dependsOn, environmentId, metadata, spec } body, RequestOptionsoptions?): TaskCreateResponse { task }
POST/gitpod.v1.EnvironmentAutomationService/CreateTask
DeleteTask
client.environments.automations.tasks.delete(TaskDeleteParams { id } body, RequestOptionsoptions?): TaskDeleteResponse
POST/gitpod.v1.EnvironmentAutomationService/DeleteTask
ListTasks
client.environments.automations.tasks.list(TaskListParams { token, pageSize, filter, pagination } params, RequestOptionsoptions?): TasksPage<Task { id, dependsOn, environmentId, 2 more } >
POST/gitpod.v1.EnvironmentAutomationService/ListTasks
GetTask
client.environments.automations.tasks.retrieve(TaskRetrieveParams { id } body, RequestOptionsoptions?): TaskRetrieveResponse { task }
POST/gitpod.v1.EnvironmentAutomationService/GetTask
StartTask
client.environments.automations.tasks.start(TaskStartParams { id } body, RequestOptionsoptions?): TaskStartResponse { taskExecution }
POST/gitpod.v1.EnvironmentAutomationService/StartTask
UpdateTask
client.environments.automations.tasks.update(TaskUpdateParams { id, dependsOn, metadata, spec } body, RequestOptionsoptions?): TaskUpdateResponse
POST/gitpod.v1.EnvironmentAutomationService/UpdateTask
ModelsExpand Collapse
TaskCreateResponse { task }
task: Task { id, dependsOn, environmentId, 2 more }
id: string
formatuuid
dependsOn?: Array<string>

dependencies specifies the IDs of the automations this task depends on.

environmentId?: string
formatuuid
metadata?: TaskMetadata { createdAt, creator, description, 3 more }
createdAt?: string

created_at is the time the task was created.

formatdate-time
creator?: Subject { id, principal }

creator describes the principal who created the task.

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
description?: string

description is a user-facing description for the task. It can be used to provide context and documentation for the task.

name?: string

name is a user-facing name for the task. Unlike the reference, this field is not unique, and not referenced by the system. This is a short descriptive name for the task.

minLength1
reference?: string

reference is a user-facing identifier for the task which must be unique on the environment. It is used to express dependencies between tasks, and to identify the task in user interactions (e.g. the CLI).

triggeredBy?: Array<AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more } >

triggered_by is a list of trigger that start the task.

beforeSnapshot?: boolean
manual?: boolean
postDevcontainerStart?: boolean
postEnvironmentStart?: boolean
postMachineStart?: boolean
prebuild?: boolean
spec?: TaskSpec { command, env, runsOn }
command?: string

command contains the command the task should execute

env?: Array<EnvironmentVariableItem { name, value, valueFrom } >

env specifies environment variables for the task.

name?: string

name is the environment variable name.

minLength1
value?: string

value is a literal string value.

valueFrom?: EnvironmentVariableSource { secretRef }

value_from specifies a source for the value.

secretRef: SecretRef { id }

secret_ref references a secret by ID.

id?: string

id is the UUID of the secret to reference.

formatuuid
runsOn?: RunsOn { docker, machine }

runs_on specifies the environment the task should run on.

docker?: Docker { environment, image }
environment?: Array<string>
image?: string
minLength1
machine?: unknown

Machine runs the service/task directly on the VM/machine level.

TaskDeleteResponse = unknown
TaskRetrieveResponse { task }
task: Task { id, dependsOn, environmentId, 2 more }
id: string
formatuuid
dependsOn?: Array<string>

dependencies specifies the IDs of the automations this task depends on.

environmentId?: string
formatuuid
metadata?: TaskMetadata { createdAt, creator, description, 3 more }
createdAt?: string

created_at is the time the task was created.

formatdate-time
creator?: Subject { id, principal }

creator describes the principal who created the task.

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
description?: string

description is a user-facing description for the task. It can be used to provide context and documentation for the task.

name?: string

name is a user-facing name for the task. Unlike the reference, this field is not unique, and not referenced by the system. This is a short descriptive name for the task.

minLength1
reference?: string

reference is a user-facing identifier for the task which must be unique on the environment. It is used to express dependencies between tasks, and to identify the task in user interactions (e.g. the CLI).

triggeredBy?: Array<AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more } >

triggered_by is a list of trigger that start the task.

beforeSnapshot?: boolean
manual?: boolean
postDevcontainerStart?: boolean
postEnvironmentStart?: boolean
postMachineStart?: boolean
prebuild?: boolean
spec?: TaskSpec { command, env, runsOn }
command?: string

command contains the command the task should execute

env?: Array<EnvironmentVariableItem { name, value, valueFrom } >

env specifies environment variables for the task.

name?: string

name is the environment variable name.

minLength1
value?: string

value is a literal string value.

valueFrom?: EnvironmentVariableSource { secretRef }

value_from specifies a source for the value.

secretRef: SecretRef { id }

secret_ref references a secret by ID.

id?: string

id is the UUID of the secret to reference.

formatuuid
runsOn?: RunsOn { docker, machine }

runs_on specifies the environment the task should run on.

docker?: Docker { environment, image }
environment?: Array<string>
image?: string
minLength1
machine?: unknown

Machine runs the service/task directly on the VM/machine level.

TaskStartResponse { taskExecution }
taskExecution: TaskExecution { id, metadata, spec, status }
id: string
formatuuid
metadata?: TaskExecutionMetadata { completedAt, createdAt, creator, 4 more }
completedAt?: string

completed_at is the time the task execution was done.

formatdate-time
createdAt?: string

created_at is the time the task was created.

formatdate-time
creator?: Subject { id, principal }

creator describes the principal who created/started the task run.

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
environmentId?: string

environment_id is the ID of the environment in which the task run is executed.

formatuuid
startedAt?: string

started_at is the time the task execution actually started to run.

formatdate-time
startedBy?: string

started_by describes the trigger that started the task execution.

taskId?: string

task_id is the ID of the main task being executed.

formatuuid
spec?: TaskExecutionSpec { desiredPhase, plan }
desiredPhase?: TaskExecutionPhase

desired_phase is the phase the task execution should be in. Used to stop a running task execution early.

One of the following:
"TASK_EXECUTION_PHASE_UNSPECIFIED"
"TASK_EXECUTION_PHASE_PENDING"
"TASK_EXECUTION_PHASE_RUNNING"
"TASK_EXECUTION_PHASE_SUCCEEDED"
"TASK_EXECUTION_PHASE_FAILED"
"TASK_EXECUTION_PHASE_STOPPED"
plan?: Array<Plan>

plan is a list of groups of steps. The steps in a group are executed concurrently, while the groups are executed sequentially. The order of the groups is the order in which they are executed.

steps?: Array<Step>
id?: string

ID is the ID of the execution step

formatuuid
dependsOn?: Array<string>
label?: string
serviceId?: string
formatuuid
task?: Task { id, spec }
id?: string
formatuuid
spec?: TaskSpec { command, env, runsOn }
command?: string

command contains the command the task should execute

env?: Array<EnvironmentVariableItem { name, value, valueFrom } >

env specifies environment variables for the task.

name?: string

name is the environment variable name.

minLength1
value?: string

value is a literal string value.

valueFrom?: EnvironmentVariableSource { secretRef }

value_from specifies a source for the value.

secretRef: SecretRef { id }

secret_ref references a secret by ID.

id?: string

id is the UUID of the secret to reference.

formatuuid
runsOn?: RunsOn { docker, machine }

runs_on specifies the environment the task should run on.

docker?: Docker { environment, image }
environment?: Array<string>
image?: string
minLength1
machine?: unknown

Machine runs the service/task directly on the VM/machine level.

status?: TaskExecutionStatus { failureMessage, logUrl, phase, 2 more }
failureMessage?: string

failure_message summarises why the task execution failed to operate. If this is non-empty the task execution has failed to operate and will likely transition to a failed state.

logUrl?: string

log_url is the URL to the logs of the task’s steps. If this is empty, the task either has no logs or has not yet started.

the phase of a task execution represents the aggregated phase of all steps.

One of the following:
"TASK_EXECUTION_PHASE_UNSPECIFIED"
"TASK_EXECUTION_PHASE_PENDING"
"TASK_EXECUTION_PHASE_RUNNING"
"TASK_EXECUTION_PHASE_SUCCEEDED"
"TASK_EXECUTION_PHASE_FAILED"
"TASK_EXECUTION_PHASE_STOPPED"
statusVersion?: string

version of the status update. Task executions themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

steps?: Array<Step>

steps provides the status for each individual step of the task execution. If a step is missing it has not yet started.

id?: string

ID is the ID of the execution step

formatuuid
failureMessage?: string

failure_message summarises why the step failed to operate. If this is non-empty the step has failed to operate and will likely transition to a failed state.

output?: Record<string, string>

output contains the output of the task execution. setting an output field to empty string will unset it.

phase is the current phase of the execution step

One of the following:
"TASK_EXECUTION_PHASE_UNSPECIFIED"
"TASK_EXECUTION_PHASE_PENDING"
"TASK_EXECUTION_PHASE_RUNNING"
"TASK_EXECUTION_PHASE_SUCCEEDED"
"TASK_EXECUTION_PHASE_FAILED"
"TASK_EXECUTION_PHASE_STOPPED"
TaskUpdateResponse = unknown

EnvironmentsAutomationsTasksExecutions

ListTaskExecutions
client.environments.automations.tasks.executions.list(ExecutionListParams { token, pageSize, filter, pagination } params, RequestOptionsoptions?): TaskExecutionsPage<TaskExecution { id, metadata, spec, status } >
POST/gitpod.v1.EnvironmentAutomationService/ListTaskExecutions
GetTaskExecution
client.environments.automations.tasks.executions.retrieve(ExecutionRetrieveParams { id } body, RequestOptionsoptions?): ExecutionRetrieveResponse { taskExecution }
POST/gitpod.v1.EnvironmentAutomationService/GetTaskExecution
StopTaskExecution
client.environments.automations.tasks.executions.stop(ExecutionStopParams { id } body, RequestOptionsoptions?): ExecutionStopResponse
POST/gitpod.v1.EnvironmentAutomationService/StopTaskExecution
ModelsExpand Collapse
ExecutionRetrieveResponse { taskExecution }
taskExecution: TaskExecution { id, metadata, spec, status }
id: string
formatuuid
metadata?: TaskExecutionMetadata { completedAt, createdAt, creator, 4 more }
completedAt?: string

completed_at is the time the task execution was done.

formatdate-time
createdAt?: string

created_at is the time the task was created.

formatdate-time
creator?: Subject { id, principal }

creator describes the principal who created/started the task run.

id?: string

id is the UUID of the subject

formatuuid
principal?: 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"
environmentId?: string

environment_id is the ID of the environment in which the task run is executed.

formatuuid
startedAt?: string

started_at is the time the task execution actually started to run.

formatdate-time
startedBy?: string

started_by describes the trigger that started the task execution.

taskId?: string

task_id is the ID of the main task being executed.

formatuuid
spec?: TaskExecutionSpec { desiredPhase, plan }
desiredPhase?: TaskExecutionPhase

desired_phase is the phase the task execution should be in. Used to stop a running task execution early.

One of the following:
"TASK_EXECUTION_PHASE_UNSPECIFIED"
"TASK_EXECUTION_PHASE_PENDING"
"TASK_EXECUTION_PHASE_RUNNING"
"TASK_EXECUTION_PHASE_SUCCEEDED"
"TASK_EXECUTION_PHASE_FAILED"
"TASK_EXECUTION_PHASE_STOPPED"
plan?: Array<Plan>

plan is a list of groups of steps. The steps in a group are executed concurrently, while the groups are executed sequentially. The order of the groups is the order in which they are executed.

steps?: Array<Step>
id?: string

ID is the ID of the execution step

formatuuid
dependsOn?: Array<string>
label?: string
serviceId?: string
formatuuid
task?: Task { id, spec }
id?: string
formatuuid
spec?: TaskSpec { command, env, runsOn }
command?: string

command contains the command the task should execute

env?: Array<EnvironmentVariableItem { name, value, valueFrom } >

env specifies environment variables for the task.

name?: string

name is the environment variable name.

minLength1
value?: string

value is a literal string value.

valueFrom?: EnvironmentVariableSource { secretRef }

value_from specifies a source for the value.

secretRef: SecretRef { id }

secret_ref references a secret by ID.

id?: string

id is the UUID of the secret to reference.

formatuuid
runsOn?: RunsOn { docker, machine }

runs_on specifies the environment the task should run on.

docker?: Docker { environment, image }
environment?: Array<string>
image?: string
minLength1
machine?: unknown

Machine runs the service/task directly on the VM/machine level.

status?: TaskExecutionStatus { failureMessage, logUrl, phase, 2 more }
failureMessage?: string

failure_message summarises why the task execution failed to operate. If this is non-empty the task execution has failed to operate and will likely transition to a failed state.

logUrl?: string

log_url is the URL to the logs of the task’s steps. If this is empty, the task either has no logs or has not yet started.

the phase of a task execution represents the aggregated phase of all steps.

One of the following:
"TASK_EXECUTION_PHASE_UNSPECIFIED"
"TASK_EXECUTION_PHASE_PENDING"
"TASK_EXECUTION_PHASE_RUNNING"
"TASK_EXECUTION_PHASE_SUCCEEDED"
"TASK_EXECUTION_PHASE_FAILED"
"TASK_EXECUTION_PHASE_STOPPED"
statusVersion?: string

version of the status update. Task executions themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

steps?: Array<Step>

steps provides the status for each individual step of the task execution. If a step is missing it has not yet started.

id?: string

ID is the ID of the execution step

formatuuid
failureMessage?: string

failure_message summarises why the step failed to operate. If this is non-empty the step has failed to operate and will likely transition to a failed state.

output?: Record<string, string>

output contains the output of the task execution. setting an output field to empty string will unset it.

phase is the current phase of the execution step

One of the following:
"TASK_EXECUTION_PHASE_UNSPECIFIED"
"TASK_EXECUTION_PHASE_PENDING"
"TASK_EXECUTION_PHASE_RUNNING"
"TASK_EXECUTION_PHASE_SUCCEEDED"
"TASK_EXECUTION_PHASE_FAILED"
"TASK_EXECUTION_PHASE_STOPPED"
ExecutionStopResponse = unknown

EnvironmentsClasses

ListEnvironmentClasses
client.environments.classes.list(ClassListParams { token, pageSize, filter, pagination } params, RequestOptionsoptions?): EnvironmentClassesPage<EnvironmentClass { id, runnerId, configuration, 3 more } >
POST/gitpod.v1.EnvironmentService/ListEnvironmentClasses