# Shared ## Domain Types ### Automation Trigger - `AutomationTrigger object { beforeSnapshot, manual, postDevcontainerStart, 3 more }` An AutomationTrigger represents a trigger for an automation action. The `manual` field shows a start button in the UI for manually triggering the automation. The `post_machine_start` field indicates that the automation should be triggered after the machine has started, before the devcontainer is ready. This is used for machine-level services like security agents that need to start early. The `post_environment_start` field indicates that the automation should be triggered after the environment has started (devcontainer ready). The `post_devcontainer_start` field indicates that the automation should be triggered after the dev container has started. The `prebuild` field starts the automation during a prebuild of an environment. This phase does not have user secrets available. The `before_snapshot` field triggers the automation after all prebuild tasks complete but before the snapshot is taken. This is used for tasks that need to run last during prebuilds, such as IDE warmup. Note: The before_snapshot trigger can only be used with tasks, not services. - `beforeSnapshot: optional boolean` - `manual: optional boolean` - `postDevcontainerStart: optional boolean` - `postEnvironmentStart: optional boolean` - `postMachineStart: optional boolean` - `prebuild: optional boolean` ### Count Response Relation - `CountResponseRelation = "COUNT_RESPONSE_RELATION_UNSPECIFIED" or "COUNT_RESPONSE_RELATION_EQ" or "COUNT_RESPONSE_RELATION_GTE"` - `"COUNT_RESPONSE_RELATION_UNSPECIFIED"` - `"COUNT_RESPONSE_RELATION_EQ"` - `"COUNT_RESPONSE_RELATION_GTE"` ### Environment Class - `EnvironmentClass object { id, runnerId, configuration, 3 more }` - `id: string` id is the unique identifier of the environment class - `runnerId: string` runner_id is the unique identifier of the runner the environment class belongs to - `configuration: optional array of FieldValue` configuration describes the configuration of the environment class - `key: optional string` - `value: optional string` - `description: optional string` description is a human readable description of the environment class - `displayName: optional string` display_name is the human readable name of the environment class - `enabled: optional boolean` enabled indicates whether the environment class can be used to create new environments. ### Environment Variable Item - `EnvironmentVariableItem object { name, value, valueFrom }` EnvironmentVariableItem represents an environment variable that can be set either from a literal value or from a secret reference. - `name: optional string` name is the environment variable name. - `value: optional string` value is a literal string value. - `valueFrom: optional EnvironmentVariableSource` value_from specifies a source for the value. - `secretRef: SecretRef` secret_ref references a secret by ID. - `id: optional string` id is the UUID of the secret to reference. ### Environment Variable Source - `EnvironmentVariableSource object { secretRef }` EnvironmentVariableSource specifies a source for an environment variable value. - `secretRef: SecretRef` secret_ref references a secret by ID. - `id: optional string` id is the UUID of the secret to reference. ### Error Code - `ErrorCode = "canceled" or "unknown" or "invalid_argument" or 13 more` The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - `"canceled"` - `"unknown"` - `"invalid_argument"` - `"deadline_exceeded"` - `"not_found"` - `"already_exists"` - `"permission_denied"` - `"resource_exhausted"` - `"failed_precondition"` - `"aborted"` - `"out_of_range"` - `"unimplemented"` - `"internal"` - `"unavailable"` - `"data_loss"` - `"unauthenticated"` ### Field Value - `FieldValue object { key, value }` - `key: optional string` - `value: optional string` ### Gateway - `Gateway object { name, url, region }` Gateway represents a system gateway that provides access to services - `name: string` name is the human-readable name of the gateway. name is unique across all gateways. - `url: string` url of the gateway - `region: optional string` region is the geographical region where the gateway is located ### Organization Role - `OrganizationRole = "ORGANIZATION_ROLE_UNSPECIFIED" or "ORGANIZATION_ROLE_ADMIN" or "ORGANIZATION_ROLE_MEMBER"` - `"ORGANIZATION_ROLE_UNSPECIFIED"` - `"ORGANIZATION_ROLE_ADMIN"` - `"ORGANIZATION_ROLE_MEMBER"` ### Organization Tier - `OrganizationTier = "ORGANIZATION_TIER_UNSPECIFIED" or "ORGANIZATION_TIER_FREE" or "ORGANIZATION_TIER_ENTERPRISE" or 2 more` - `"ORGANIZATION_TIER_UNSPECIFIED"` - `"ORGANIZATION_TIER_FREE"` - `"ORGANIZATION_TIER_ENTERPRISE"` - `"ORGANIZATION_TIER_CORE"` - `"ORGANIZATION_TIER_FREE_ONA"` ### Principal - `Principal = "PRINCIPAL_UNSPECIFIED" or "PRINCIPAL_ACCOUNT" or "PRINCIPAL_USER" or 4 more` - `"PRINCIPAL_UNSPECIFIED"` - `"PRINCIPAL_ACCOUNT"` - `"PRINCIPAL_USER"` - `"PRINCIPAL_RUNNER"` - `"PRINCIPAL_ENVIRONMENT"` - `"PRINCIPAL_SERVICE_ACCOUNT"` - `"PRINCIPAL_RUNNER_MANAGER"` ### Project Environment Class - `ProjectEnvironmentClass object { environmentClassId, localRunner, order }` - `environmentClassId: optional string` Use a fixed environment class on a given Runner. This cannot be a local runner's environment class. - `localRunner: optional boolean` Use a local runner for the user - `order: optional number` order is the priority of this entry ### Resource Role - `ResourceRole = "RESOURCE_ROLE_UNSPECIFIED" or "RESOURCE_ROLE_ORG_ADMIN" or "RESOURCE_ROLE_ORG_MEMBER" or 59 more` ResourceRole represents roles that can be assigned to groups on resources These map directly to the roles defined in backend/db/rule/rbac/role/role.go - `"RESOURCE_ROLE_UNSPECIFIED"` - `"RESOURCE_ROLE_ORG_ADMIN"` - `"RESOURCE_ROLE_ORG_MEMBER"` - `"RESOURCE_ROLE_ORG_RUNNERS_ADMIN"` - `"RESOURCE_ROLE_ORG_PROJECTS_ADMIN"` - `"RESOURCE_ROLE_ORG_AUTOMATIONS_ADMIN"` - `"RESOURCE_ROLE_ORG_GROUPS_ADMIN"` - `"RESOURCE_ROLE_ORG_AUDIT_LOG_READER"` - `"RESOURCE_ROLE_GROUP_ADMIN"` - `"RESOURCE_ROLE_GROUP_VIEWER"` - `"RESOURCE_ROLE_USER_IDENTITY"` - `"RESOURCE_ROLE_USER_VIEWER"` - `"RESOURCE_ROLE_USER_ADMIN"` - `"RESOURCE_ROLE_ENVIRONMENT_IDENTITY"` - `"RESOURCE_ROLE_ENVIRONMENT_ADMIN"` - `"RESOURCE_ROLE_ENVIRONMENT_USER"` - `"RESOURCE_ROLE_ENVIRONMENT_VIEWER"` - `"RESOURCE_ROLE_ENVIRONMENT_RUNNER"` - `"RESOURCE_ROLE_RUNNER_IDENTITY"` - `"RESOURCE_ROLE_RUNNER_ADMIN"` - `"RESOURCE_ROLE_RUNNER_LOCAL_ADMIN"` - `"RESOURCE_ROLE_RUNNER_MANAGED_ADMIN"` - `"RESOURCE_ROLE_RUNNER_USER"` - `"RESOURCE_ROLE_RUNNER_CONFIGURATION_READER"` - `"RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_ADMIN"` - `"RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_UPDATER"` - `"RESOURCE_ROLE_PROJECT_ADMIN"` - `"RESOURCE_ROLE_PROJECT_USER"` - `"RESOURCE_ROLE_PROJECT_EDITOR"` - `"RESOURCE_ROLE_ENVIRONMENT_SERVICE_ADMIN"` - `"RESOURCE_ROLE_ENVIRONMENT_SERVICE_VIEWER"` - `"RESOURCE_ROLE_ENVIRONMENT_SERVICE_USER"` - `"RESOURCE_ROLE_ENVIRONMENT_SERVICE_ENV"` - `"RESOURCE_ROLE_ENVIRONMENT_TASK_ADMIN"` - `"RESOURCE_ROLE_ENVIRONMENT_TASK_VIEWER"` - `"RESOURCE_ROLE_ENVIRONMENT_TASK_USER"` - `"RESOURCE_ROLE_ENVIRONMENT_TASK_ENV"` - `"RESOURCE_ROLE_SERVICE_ACCOUNT_IDENTITY"` - `"RESOURCE_ROLE_SERVICE_ACCOUNT_ADMIN"` - `"RESOURCE_ROLE_AGENT_EXECUTION_USER"` - `"RESOURCE_ROLE_AGENT_EXECUTION_ADMIN"` - `"RESOURCE_ROLE_AGENT_EXECUTION_RUNNER"` - `"RESOURCE_ROLE_AGENT_EXECUTION_OUTPUTS_REPORTER"` - `"RESOURCE_ROLE_AGENT_EXECUTION_VIEWER"` - `"RESOURCE_ROLE_AGENT_ADMIN"` - `"RESOURCE_ROLE_AGENT_VIEWER"` - `"RESOURCE_ROLE_AGENT_EXECUTOR"` - `"RESOURCE_ROLE_WORKFLOW_ADMIN"` - `"RESOURCE_ROLE_WORKFLOW_USER"` - `"RESOURCE_ROLE_WORKFLOW_VIEWER"` - `"RESOURCE_ROLE_WORKFLOW_EXECUTOR"` - `"RESOURCE_ROLE_SNAPSHOT_ADMIN"` - `"RESOURCE_ROLE_SNAPSHOT_RUNNER"` - `"RESOURCE_ROLE_WEBHOOK_ADMIN"` - `"RESOURCE_ROLE_WEBHOOK_VIEWER"` - `"RESOURCE_ROLE_WARMPOOL_RUNNER"` - `"RESOURCE_ROLE_WARMPOOL_ADMIN"` - `"RESOURCE_ROLE_WARMPOOL_VIEWER"` - `"RESOURCE_ROLE_SESSION_ADMIN"` - `"RESOURCE_ROLE_SESSION_USER"` - `"RESOURCE_ROLE_TEAM_ADMIN"` - `"RESOURCE_ROLE_TEAM_VIEWER"` ### Resource Type - `ResourceType = "RESOURCE_TYPE_UNSPECIFIED" or "RESOURCE_TYPE_ENVIRONMENT" or "RESOURCE_TYPE_RUNNER" or 47 more` - `"RESOURCE_TYPE_UNSPECIFIED"` - `"RESOURCE_TYPE_ENVIRONMENT"` - `"RESOURCE_TYPE_RUNNER"` - `"RESOURCE_TYPE_PROJECT"` - `"RESOURCE_TYPE_TASK"` - `"RESOURCE_TYPE_TASK_EXECUTION"` - `"RESOURCE_TYPE_SERVICE"` - `"RESOURCE_TYPE_ORGANIZATION"` - `"RESOURCE_TYPE_USER"` - `"RESOURCE_TYPE_ENVIRONMENT_CLASS"` - `"RESOURCE_TYPE_RUNNER_SCM_INTEGRATION"` - `"RESOURCE_TYPE_HOST_AUTHENTICATION_TOKEN"` - `"RESOURCE_TYPE_GROUP"` - `"RESOURCE_TYPE_PERSONAL_ACCESS_TOKEN"` - `"RESOURCE_TYPE_USER_PREFERENCE"` - `"RESOURCE_TYPE_SERVICE_ACCOUNT"` - `"RESOURCE_TYPE_SECRET"` - `"RESOURCE_TYPE_SSO_CONFIG"` - `"RESOURCE_TYPE_DOMAIN_VERIFICATION"` - `"RESOURCE_TYPE_AGENT_EXECUTION"` - `"RESOURCE_TYPE_RUNNER_LLM_INTEGRATION"` - `"RESOURCE_TYPE_AGENT"` - `"RESOURCE_TYPE_ENVIRONMENT_SESSION"` - `"RESOURCE_TYPE_USER_SECRET"` - `"RESOURCE_TYPE_ORGANIZATION_POLICY"` - `"RESOURCE_TYPE_ORGANIZATION_SECRET"` - `"RESOURCE_TYPE_PROJECT_ENVIRONMENT_CLASS"` - `"RESOURCE_TYPE_BILLING"` - `"RESOURCE_TYPE_PROMPT"` - `"RESOURCE_TYPE_COUPON"` - `"RESOURCE_TYPE_COUPON_REDEMPTION"` - `"RESOURCE_TYPE_ACCOUNT"` - `"RESOURCE_TYPE_INTEGRATION"` - `"RESOURCE_TYPE_WORKFLOW"` - `"RESOURCE_TYPE_WORKFLOW_EXECUTION"` - `"RESOURCE_TYPE_WORKFLOW_EXECUTION_ACTION"` - `"RESOURCE_TYPE_SNAPSHOT"` - `"RESOURCE_TYPE_PREBUILD"` - `"RESOURCE_TYPE_ORGANIZATION_LLM_INTEGRATION"` - `"RESOURCE_TYPE_CUSTOM_DOMAIN"` - `"RESOURCE_TYPE_ROLE_ASSIGNMENT_CHANGED"` - `"RESOURCE_TYPE_GROUP_MEMBERSHIP_CHANGED"` - `"RESOURCE_TYPE_WEBHOOK"` - `"RESOURCE_TYPE_SCIM_CONFIGURATION"` - `"RESOURCE_TYPE_SERVICE_ACCOUNT_SECRET"` - `"RESOURCE_TYPE_ANNOUNCEMENT_BANNER"` - `"RESOURCE_TYPE_SERVICE_ACCOUNT_TOKEN"` - `"RESOURCE_TYPE_ROLE_ASSIGNMENT"` - `"RESOURCE_TYPE_WARM_POOL"` - `"RESOURCE_TYPE_NOTIFICATION"` ### Runs On - `RunsOn object { docker, machine }` - `docker: optional object { environment, image }` - `environment: optional array of string` - `image: optional string` - `machine: optional unknown` Machine runs the service/task directly on the VM/machine level. ### Secret Ref - `SecretRef object { id }` SecretRef references a secret by its ID. - `id: optional string` id is the UUID of the secret to reference. ### Sort - `Sort object { field, order }` - `field: optional string` Field name to sort by, in camelCase. - `order: optional SortOrder` - `"SORT_ORDER_UNSPECIFIED"` - `"SORT_ORDER_ASC"` - `"SORT_ORDER_DESC"` ### Sort Order - `SortOrder = "SORT_ORDER_UNSPECIFIED" or "SORT_ORDER_ASC" or "SORT_ORDER_DESC"` - `"SORT_ORDER_UNSPECIFIED"` - `"SORT_ORDER_ASC"` - `"SORT_ORDER_DESC"` ### State - `State = "STATE_UNSPECIFIED" or "STATE_OPEN" or "STATE_CLOSED" or "STATE_MERGED"` Current state of the pull request - `"STATE_UNSPECIFIED"` - `"STATE_OPEN"` - `"STATE_CLOSED"` - `"STATE_MERGED"` ### Subject - `Subject object { id, principal }` - `id: optional string` id is the UUID of the subject - `principal: optional Principal` Principal is the principal of the subject - `"PRINCIPAL_UNSPECIFIED"` - `"PRINCIPAL_ACCOUNT"` - `"PRINCIPAL_USER"` - `"PRINCIPAL_RUNNER"` - `"PRINCIPAL_ENVIRONMENT"` - `"PRINCIPAL_SERVICE_ACCOUNT"` - `"PRINCIPAL_RUNNER_MANAGER"` ### Task - `Task object { id, dependsOn, environmentId, 2 more }` - `id: string` - `dependsOn: optional array of string` dependencies specifies the IDs of the automations this task depends on. - `environmentId: optional string` - `metadata: optional TaskMetadata` - `createdAt: optional string` created_at is the time the task was created. - `creator: optional Subject` creator describes the principal who created the task. - `id: optional string` id is the UUID of the subject - `principal: optional Principal` Principal is the principal of the subject - `"PRINCIPAL_UNSPECIFIED"` - `"PRINCIPAL_ACCOUNT"` - `"PRINCIPAL_USER"` - `"PRINCIPAL_RUNNER"` - `"PRINCIPAL_ENVIRONMENT"` - `"PRINCIPAL_SERVICE_ACCOUNT"` - `"PRINCIPAL_RUNNER_MANAGER"` - `description: optional string` description is a user-facing description for the task. It can be used to provide context and documentation for the task. - `name: optional 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. - `reference: optional 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: optional array of AutomationTrigger` triggered_by is a list of trigger that start the task. - `beforeSnapshot: optional boolean` - `manual: optional boolean` - `postDevcontainerStart: optional boolean` - `postEnvironmentStart: optional boolean` - `postMachineStart: optional boolean` - `prebuild: optional boolean` - `spec: optional TaskSpec` - `command: optional string` command contains the command the task should execute - `env: optional array of EnvironmentVariableItem` env specifies environment variables for the task. - `name: optional string` name is the environment variable name. - `value: optional string` value is a literal string value. - `valueFrom: optional EnvironmentVariableSource` value_from specifies a source for the value. - `secretRef: SecretRef` secret_ref references a secret by ID. - `id: optional string` id is the UUID of the secret to reference. - `runsOn: optional RunsOn` runs_on specifies the environment the task should run on. - `docker: optional object { environment, image }` - `environment: optional array of string` - `image: optional string` - `machine: optional unknown` Machine runs the service/task directly on the VM/machine level. ### Task Execution - `TaskExecution object { id, metadata, spec, status }` - `id: string` - `metadata: optional TaskExecutionMetadata` - `completedAt: optional string` completed_at is the time the task execution was done. - `createdAt: optional string` created_at is the time the task was created. - `creator: optional Subject` creator describes the principal who created/started the task run. - `id: optional string` id is the UUID of the subject - `principal: optional Principal` Principal is the principal of the subject - `"PRINCIPAL_UNSPECIFIED"` - `"PRINCIPAL_ACCOUNT"` - `"PRINCIPAL_USER"` - `"PRINCIPAL_RUNNER"` - `"PRINCIPAL_ENVIRONMENT"` - `"PRINCIPAL_SERVICE_ACCOUNT"` - `"PRINCIPAL_RUNNER_MANAGER"` - `environmentId: optional string` environment_id is the ID of the environment in which the task run is executed. - `startedAt: optional string` started_at is the time the task execution actually started to run. - `startedBy: optional string` started_by describes the trigger that started the task execution. - `taskId: optional string` task_id is the ID of the main task being executed. - `spec: optional TaskExecutionSpec` - `desiredPhase: optional TaskExecutionPhase` desired_phase is the phase the task execution should be in. Used to stop a running task execution early. - `"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: optional array of object { steps }` 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: optional array of object { id, dependsOn, label, 2 more }` - `id: optional string` ID is the ID of the execution step - `dependsOn: optional array of string` - `label: optional string` - `serviceId: optional string` - `task: optional object { id, spec }` - `id: optional string` - `spec: optional TaskSpec` - `command: optional string` command contains the command the task should execute - `env: optional array of EnvironmentVariableItem` env specifies environment variables for the task. - `name: optional string` name is the environment variable name. - `value: optional string` value is a literal string value. - `valueFrom: optional EnvironmentVariableSource` value_from specifies a source for the value. - `secretRef: SecretRef` secret_ref references a secret by ID. - `id: optional string` id is the UUID of the secret to reference. - `runsOn: optional RunsOn` runs_on specifies the environment the task should run on. - `docker: optional object { environment, image }` - `environment: optional array of string` - `image: optional string` - `machine: optional unknown` Machine runs the service/task directly on the VM/machine level. - `status: optional TaskExecutionStatus` - `failureMessage: optional 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: optional 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. - `phase: optional TaskExecutionPhase` the phase of a task execution represents the aggregated phase of all steps. - `statusVersion: optional 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: optional array of object { id, failureMessage, output, phase }` steps provides the status for each individual step of the task execution. If a step is missing it has not yet started. - `id: optional string` ID is the ID of the execution step - `failureMessage: optional 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: optional map[string]` output contains the output of the task execution. setting an output field to empty string will unset it. - `phase: optional TaskExecutionPhase` phase is the current phase of the execution step ### Task Execution Metadata - `TaskExecutionMetadata object { completedAt, createdAt, creator, 4 more }` - `completedAt: optional string` completed_at is the time the task execution was done. - `createdAt: optional string` created_at is the time the task was created. - `creator: optional Subject` creator describes the principal who created/started the task run. - `id: optional string` id is the UUID of the subject - `principal: optional Principal` Principal is the principal of the subject - `"PRINCIPAL_UNSPECIFIED"` - `"PRINCIPAL_ACCOUNT"` - `"PRINCIPAL_USER"` - `"PRINCIPAL_RUNNER"` - `"PRINCIPAL_ENVIRONMENT"` - `"PRINCIPAL_SERVICE_ACCOUNT"` - `"PRINCIPAL_RUNNER_MANAGER"` - `environmentId: optional string` environment_id is the ID of the environment in which the task run is executed. - `startedAt: optional string` started_at is the time the task execution actually started to run. - `startedBy: optional string` started_by describes the trigger that started the task execution. - `taskId: optional string` task_id is the ID of the main task being executed. ### Task Execution Phase - `TaskExecutionPhase = "TASK_EXECUTION_PHASE_UNSPECIFIED" or "TASK_EXECUTION_PHASE_PENDING" or "TASK_EXECUTION_PHASE_RUNNING" or 3 more` - `"TASK_EXECUTION_PHASE_UNSPECIFIED"` - `"TASK_EXECUTION_PHASE_PENDING"` - `"TASK_EXECUTION_PHASE_RUNNING"` - `"TASK_EXECUTION_PHASE_SUCCEEDED"` - `"TASK_EXECUTION_PHASE_FAILED"` - `"TASK_EXECUTION_PHASE_STOPPED"` ### Task Execution Spec - `TaskExecutionSpec object { desiredPhase, plan }` - `desiredPhase: optional TaskExecutionPhase` desired_phase is the phase the task execution should be in. Used to stop a running task execution early. - `"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: optional array of object { steps }` 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: optional array of object { id, dependsOn, label, 2 more }` - `id: optional string` ID is the ID of the execution step - `dependsOn: optional array of string` - `label: optional string` - `serviceId: optional string` - `task: optional object { id, spec }` - `id: optional string` - `spec: optional TaskSpec` - `command: optional string` command contains the command the task should execute - `env: optional array of EnvironmentVariableItem` env specifies environment variables for the task. - `name: optional string` name is the environment variable name. - `value: optional string` value is a literal string value. - `valueFrom: optional EnvironmentVariableSource` value_from specifies a source for the value. - `secretRef: SecretRef` secret_ref references a secret by ID. - `id: optional string` id is the UUID of the secret to reference. - `runsOn: optional RunsOn` runs_on specifies the environment the task should run on. - `docker: optional object { environment, image }` - `environment: optional array of string` - `image: optional string` - `machine: optional unknown` Machine runs the service/task directly on the VM/machine level. ### Task Execution Status - `TaskExecutionStatus object { failureMessage, logUrl, phase, 2 more }` - `failureMessage: optional 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: optional 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. - `phase: optional TaskExecutionPhase` the phase of a task execution represents the aggregated phase of all steps. - `"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: optional 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: optional array of object { id, failureMessage, output, phase }` steps provides the status for each individual step of the task execution. If a step is missing it has not yet started. - `id: optional string` ID is the ID of the execution step - `failureMessage: optional 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: optional map[string]` output contains the output of the task execution. setting an output field to empty string will unset it. - `phase: optional TaskExecutionPhase` phase is the current phase of the execution step ### Task Metadata - `TaskMetadata object { createdAt, creator, description, 3 more }` - `createdAt: optional string` created_at is the time the task was created. - `creator: optional Subject` creator describes the principal who created the task. - `id: optional string` id is the UUID of the subject - `principal: optional Principal` Principal is the principal of the subject - `"PRINCIPAL_UNSPECIFIED"` - `"PRINCIPAL_ACCOUNT"` - `"PRINCIPAL_USER"` - `"PRINCIPAL_RUNNER"` - `"PRINCIPAL_ENVIRONMENT"` - `"PRINCIPAL_SERVICE_ACCOUNT"` - `"PRINCIPAL_RUNNER_MANAGER"` - `description: optional string` description is a user-facing description for the task. It can be used to provide context and documentation for the task. - `name: optional 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. - `reference: optional 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: optional array of AutomationTrigger` triggered_by is a list of trigger that start the task. - `beforeSnapshot: optional boolean` - `manual: optional boolean` - `postDevcontainerStart: optional boolean` - `postEnvironmentStart: optional boolean` - `postMachineStart: optional boolean` - `prebuild: optional boolean` ### Task Spec - `TaskSpec object { command, env, runsOn }` - `command: optional string` command contains the command the task should execute - `env: optional array of EnvironmentVariableItem` env specifies environment variables for the task. - `name: optional string` name is the environment variable name. - `value: optional string` value is a literal string value. - `valueFrom: optional EnvironmentVariableSource` value_from specifies a source for the value. - `secretRef: SecretRef` secret_ref references a secret by ID. - `id: optional string` id is the UUID of the secret to reference. - `runsOn: optional RunsOn` runs_on specifies the environment the task should run on. - `docker: optional object { environment, image }` - `environment: optional array of string` - `image: optional string` - `machine: optional unknown` Machine runs the service/task directly on the VM/machine level. ### User Status - `UserStatus = "USER_STATUS_UNSPECIFIED" or "USER_STATUS_ACTIVE" or "USER_STATUS_SUSPENDED" or "USER_STATUS_LEFT"` - `"USER_STATUS_UNSPECIFIED"` - `"USER_STATUS_ACTIVE"` - `"USER_STATUS_SUSPENDED"` - `"USER_STATUS_LEFT"`