# Shared ## Domain Types ### Automation Trigger - `type AutomationTrigger struct{…}` 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 bool` - `Manual bool` - `PostDevcontainerStart bool` - `PostEnvironmentStart bool` - `PostMachineStart bool` - `Prebuild bool` ### Count Response Relation - `type CountResponseRelation string` - `const CountResponseRelationUnspecified CountResponseRelation = "COUNT_RESPONSE_RELATION_UNSPECIFIED"` - `const CountResponseRelationEq CountResponseRelation = "COUNT_RESPONSE_RELATION_EQ"` - `const CountResponseRelationGte CountResponseRelation = "COUNT_RESPONSE_RELATION_GTE"` ### Environment Class - `type EnvironmentClass struct{…}` - `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 []FieldValue` configuration describes the configuration of the environment class - `Key string` - `Value string` - `Description string` description is a human readable description of the environment class - `DisplayName string` display_name is the human readable name of the environment class - `Enabled bool` enabled indicates whether the environment class can be used to create new environments. ### Environment Variable Item - `type EnvironmentVariableItem struct{…}` EnvironmentVariableItem represents an environment variable that can be set either from a literal value or from a secret reference. - `Name string` name is the environment variable name. - `Value string` value is a literal string value. - `ValueFrom EnvironmentVariableSource` value_from specifies a source for the value. - `SecretRef SecretRef` secret_ref references a secret by ID. - `ID string` id is the UUID of the secret to reference. ### Environment Variable Source - `type EnvironmentVariableSource struct{…}` EnvironmentVariableSource specifies a source for an environment variable value. - `SecretRef SecretRef` secret_ref references a secret by ID. - `ID string` id is the UUID of the secret to reference. ### Error Code - `type ErrorCode string` The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - `const ErrorCodeCanceled ErrorCode = "canceled"` - `const ErrorCodeUnknown ErrorCode = "unknown"` - `const ErrorCodeInvalidArgument ErrorCode = "invalid_argument"` - `const ErrorCodeDeadlineExceeded ErrorCode = "deadline_exceeded"` - `const ErrorCodeNotFound ErrorCode = "not_found"` - `const ErrorCodeAlreadyExists ErrorCode = "already_exists"` - `const ErrorCodePermissionDenied ErrorCode = "permission_denied"` - `const ErrorCodeResourceExhausted ErrorCode = "resource_exhausted"` - `const ErrorCodeFailedPrecondition ErrorCode = "failed_precondition"` - `const ErrorCodeAborted ErrorCode = "aborted"` - `const ErrorCodeOutOfRange ErrorCode = "out_of_range"` - `const ErrorCodeUnimplemented ErrorCode = "unimplemented"` - `const ErrorCodeInternal ErrorCode = "internal"` - `const ErrorCodeUnavailable ErrorCode = "unavailable"` - `const ErrorCodeDataLoss ErrorCode = "data_loss"` - `const ErrorCodeUnauthenticated ErrorCode = "unauthenticated"` ### Field Value - `type FieldValue struct{…}` - `Key string` - `Value string` ### Gateway - `type Gateway struct{…}` 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 string` region is the geographical region where the gateway is located ### Organization Role - `type OrganizationRole string` - `const OrganizationRoleUnspecified OrganizationRole = "ORGANIZATION_ROLE_UNSPECIFIED"` - `const OrganizationRoleAdmin OrganizationRole = "ORGANIZATION_ROLE_ADMIN"` - `const OrganizationRoleMember OrganizationRole = "ORGANIZATION_ROLE_MEMBER"` ### Organization Tier - `type OrganizationTier string` - `const OrganizationTierUnspecified OrganizationTier = "ORGANIZATION_TIER_UNSPECIFIED"` - `const OrganizationTierFree OrganizationTier = "ORGANIZATION_TIER_FREE"` - `const OrganizationTierEnterprise OrganizationTier = "ORGANIZATION_TIER_ENTERPRISE"` - `const OrganizationTierCore OrganizationTier = "ORGANIZATION_TIER_CORE"` - `const OrganizationTierFreeOna OrganizationTier = "ORGANIZATION_TIER_FREE_ONA"` ### Principal - `type Principal string` - `const PrincipalUnspecified Principal = "PRINCIPAL_UNSPECIFIED"` - `const PrincipalAccount Principal = "PRINCIPAL_ACCOUNT"` - `const PrincipalUser Principal = "PRINCIPAL_USER"` - `const PrincipalRunner Principal = "PRINCIPAL_RUNNER"` - `const PrincipalEnvironment Principal = "PRINCIPAL_ENVIRONMENT"` - `const PrincipalServiceAccount Principal = "PRINCIPAL_SERVICE_ACCOUNT"` - `const PrincipalRunnerManager Principal = "PRINCIPAL_RUNNER_MANAGER"` ### Project Environment Class - `type ProjectEnvironmentClass struct{…}` - `EnvironmentClassID string` Use a fixed environment class on a given Runner. This cannot be a local runner's environment class. - `LocalRunner bool` Use a local runner for the user - `Order int64` order is the priority of this entry ### Resource Role - `type ResourceRole string` 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 - `const ResourceRoleUnspecified ResourceRole = "RESOURCE_ROLE_UNSPECIFIED"` - `const ResourceRoleOrgAdmin ResourceRole = "RESOURCE_ROLE_ORG_ADMIN"` - `const ResourceRoleOrgMember ResourceRole = "RESOURCE_ROLE_ORG_MEMBER"` - `const ResourceRoleOrgRunnersAdmin ResourceRole = "RESOURCE_ROLE_ORG_RUNNERS_ADMIN"` - `const ResourceRoleOrgProjectsAdmin ResourceRole = "RESOURCE_ROLE_ORG_PROJECTS_ADMIN"` - `const ResourceRoleOrgAutomationsAdmin ResourceRole = "RESOURCE_ROLE_ORG_AUTOMATIONS_ADMIN"` - `const ResourceRoleOrgGroupsAdmin ResourceRole = "RESOURCE_ROLE_ORG_GROUPS_ADMIN"` - `const ResourceRoleOrgAuditLogReader ResourceRole = "RESOURCE_ROLE_ORG_AUDIT_LOG_READER"` - `const ResourceRoleGroupAdmin ResourceRole = "RESOURCE_ROLE_GROUP_ADMIN"` - `const ResourceRoleGroupViewer ResourceRole = "RESOURCE_ROLE_GROUP_VIEWER"` - `const ResourceRoleUserIdentity ResourceRole = "RESOURCE_ROLE_USER_IDENTITY"` - `const ResourceRoleUserViewer ResourceRole = "RESOURCE_ROLE_USER_VIEWER"` - `const ResourceRoleUserAdmin ResourceRole = "RESOURCE_ROLE_USER_ADMIN"` - `const ResourceRoleEnvironmentIdentity ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_IDENTITY"` - `const ResourceRoleEnvironmentAdmin ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_ADMIN"` - `const ResourceRoleEnvironmentUser ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_USER"` - `const ResourceRoleEnvironmentViewer ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_VIEWER"` - `const ResourceRoleEnvironmentRunner ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_RUNNER"` - `const ResourceRoleRunnerIdentity ResourceRole = "RESOURCE_ROLE_RUNNER_IDENTITY"` - `const ResourceRoleRunnerAdmin ResourceRole = "RESOURCE_ROLE_RUNNER_ADMIN"` - `const ResourceRoleRunnerLocalAdmin ResourceRole = "RESOURCE_ROLE_RUNNER_LOCAL_ADMIN"` - `const ResourceRoleRunnerManagedAdmin ResourceRole = "RESOURCE_ROLE_RUNNER_MANAGED_ADMIN"` - `const ResourceRoleRunnerUser ResourceRole = "RESOURCE_ROLE_RUNNER_USER"` - `const ResourceRoleRunnerConfigurationReader ResourceRole = "RESOURCE_ROLE_RUNNER_CONFIGURATION_READER"` - `const ResourceRoleHostAuthenticationTokenAdmin ResourceRole = "RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_ADMIN"` - `const ResourceRoleHostAuthenticationTokenUpdater ResourceRole = "RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_UPDATER"` - `const ResourceRoleProjectAdmin ResourceRole = "RESOURCE_ROLE_PROJECT_ADMIN"` - `const ResourceRoleProjectUser ResourceRole = "RESOURCE_ROLE_PROJECT_USER"` - `const ResourceRoleProjectEditor ResourceRole = "RESOURCE_ROLE_PROJECT_EDITOR"` - `const ResourceRoleEnvironmentServiceAdmin ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_SERVICE_ADMIN"` - `const ResourceRoleEnvironmentServiceViewer ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_SERVICE_VIEWER"` - `const ResourceRoleEnvironmentServiceUser ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_SERVICE_USER"` - `const ResourceRoleEnvironmentServiceEnv ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_SERVICE_ENV"` - `const ResourceRoleEnvironmentTaskAdmin ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_TASK_ADMIN"` - `const ResourceRoleEnvironmentTaskViewer ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_TASK_VIEWER"` - `const ResourceRoleEnvironmentTaskUser ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_TASK_USER"` - `const ResourceRoleEnvironmentTaskEnv ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_TASK_ENV"` - `const ResourceRoleServiceAccountIdentity ResourceRole = "RESOURCE_ROLE_SERVICE_ACCOUNT_IDENTITY"` - `const ResourceRoleServiceAccountAdmin ResourceRole = "RESOURCE_ROLE_SERVICE_ACCOUNT_ADMIN"` - `const ResourceRoleAgentExecutionUser ResourceRole = "RESOURCE_ROLE_AGENT_EXECUTION_USER"` - `const ResourceRoleAgentExecutionAdmin ResourceRole = "RESOURCE_ROLE_AGENT_EXECUTION_ADMIN"` - `const ResourceRoleAgentExecutionRunner ResourceRole = "RESOURCE_ROLE_AGENT_EXECUTION_RUNNER"` - `const ResourceRoleAgentExecutionOutputsReporter ResourceRole = "RESOURCE_ROLE_AGENT_EXECUTION_OUTPUTS_REPORTER"` - `const ResourceRoleAgentExecutionViewer ResourceRole = "RESOURCE_ROLE_AGENT_EXECUTION_VIEWER"` - `const ResourceRoleAgentAdmin ResourceRole = "RESOURCE_ROLE_AGENT_ADMIN"` - `const ResourceRoleAgentViewer ResourceRole = "RESOURCE_ROLE_AGENT_VIEWER"` - `const ResourceRoleAgentExecutor ResourceRole = "RESOURCE_ROLE_AGENT_EXECUTOR"` - `const ResourceRoleWorkflowAdmin ResourceRole = "RESOURCE_ROLE_WORKFLOW_ADMIN"` - `const ResourceRoleWorkflowUser ResourceRole = "RESOURCE_ROLE_WORKFLOW_USER"` - `const ResourceRoleWorkflowViewer ResourceRole = "RESOURCE_ROLE_WORKFLOW_VIEWER"` - `const ResourceRoleWorkflowExecutor ResourceRole = "RESOURCE_ROLE_WORKFLOW_EXECUTOR"` - `const ResourceRoleSnapshotAdmin ResourceRole = "RESOURCE_ROLE_SNAPSHOT_ADMIN"` - `const ResourceRoleSnapshotRunner ResourceRole = "RESOURCE_ROLE_SNAPSHOT_RUNNER"` - `const ResourceRoleWebhookAdmin ResourceRole = "RESOURCE_ROLE_WEBHOOK_ADMIN"` - `const ResourceRoleWebhookViewer ResourceRole = "RESOURCE_ROLE_WEBHOOK_VIEWER"` - `const ResourceRoleWarmpoolRunner ResourceRole = "RESOURCE_ROLE_WARMPOOL_RUNNER"` - `const ResourceRoleWarmpoolAdmin ResourceRole = "RESOURCE_ROLE_WARMPOOL_ADMIN"` - `const ResourceRoleWarmpoolViewer ResourceRole = "RESOURCE_ROLE_WARMPOOL_VIEWER"` - `const ResourceRoleSessionAdmin ResourceRole = "RESOURCE_ROLE_SESSION_ADMIN"` - `const ResourceRoleSessionUser ResourceRole = "RESOURCE_ROLE_SESSION_USER"` - `const ResourceRoleTeamAdmin ResourceRole = "RESOURCE_ROLE_TEAM_ADMIN"` - `const ResourceRoleTeamViewer ResourceRole = "RESOURCE_ROLE_TEAM_VIEWER"` ### Resource Type - `type ResourceType string` - `const ResourceTypeUnspecified ResourceType = "RESOURCE_TYPE_UNSPECIFIED"` - `const ResourceTypeEnvironment ResourceType = "RESOURCE_TYPE_ENVIRONMENT"` - `const ResourceTypeRunner ResourceType = "RESOURCE_TYPE_RUNNER"` - `const ResourceTypeProject ResourceType = "RESOURCE_TYPE_PROJECT"` - `const ResourceTypeTask ResourceType = "RESOURCE_TYPE_TASK"` - `const ResourceTypeTaskExecution ResourceType = "RESOURCE_TYPE_TASK_EXECUTION"` - `const ResourceTypeService ResourceType = "RESOURCE_TYPE_SERVICE"` - `const ResourceTypeOrganization ResourceType = "RESOURCE_TYPE_ORGANIZATION"` - `const ResourceTypeUser ResourceType = "RESOURCE_TYPE_USER"` - `const ResourceTypeEnvironmentClass ResourceType = "RESOURCE_TYPE_ENVIRONMENT_CLASS"` - `const ResourceTypeRunnerScmIntegration ResourceType = "RESOURCE_TYPE_RUNNER_SCM_INTEGRATION"` - `const ResourceTypeHostAuthenticationToken ResourceType = "RESOURCE_TYPE_HOST_AUTHENTICATION_TOKEN"` - `const ResourceTypeGroup ResourceType = "RESOURCE_TYPE_GROUP"` - `const ResourceTypePersonalAccessToken ResourceType = "RESOURCE_TYPE_PERSONAL_ACCESS_TOKEN"` - `const ResourceTypeUserPreference ResourceType = "RESOURCE_TYPE_USER_PREFERENCE"` - `const ResourceTypeServiceAccount ResourceType = "RESOURCE_TYPE_SERVICE_ACCOUNT"` - `const ResourceTypeSecret ResourceType = "RESOURCE_TYPE_SECRET"` - `const ResourceTypeSSOConfig ResourceType = "RESOURCE_TYPE_SSO_CONFIG"` - `const ResourceTypeDomainVerification ResourceType = "RESOURCE_TYPE_DOMAIN_VERIFICATION"` - `const ResourceTypeAgentExecution ResourceType = "RESOURCE_TYPE_AGENT_EXECUTION"` - `const ResourceTypeRunnerLlmIntegration ResourceType = "RESOURCE_TYPE_RUNNER_LLM_INTEGRATION"` - `const ResourceTypeAgent ResourceType = "RESOURCE_TYPE_AGENT"` - `const ResourceTypeEnvironmentSession ResourceType = "RESOURCE_TYPE_ENVIRONMENT_SESSION"` - `const ResourceTypeUserSecret ResourceType = "RESOURCE_TYPE_USER_SECRET"` - `const ResourceTypeOrganizationPolicy ResourceType = "RESOURCE_TYPE_ORGANIZATION_POLICY"` - `const ResourceTypeOrganizationSecret ResourceType = "RESOURCE_TYPE_ORGANIZATION_SECRET"` - `const ResourceTypeProjectEnvironmentClass ResourceType = "RESOURCE_TYPE_PROJECT_ENVIRONMENT_CLASS"` - `const ResourceTypeBilling ResourceType = "RESOURCE_TYPE_BILLING"` - `const ResourceTypePrompt ResourceType = "RESOURCE_TYPE_PROMPT"` - `const ResourceTypeCoupon ResourceType = "RESOURCE_TYPE_COUPON"` - `const ResourceTypeCouponRedemption ResourceType = "RESOURCE_TYPE_COUPON_REDEMPTION"` - `const ResourceTypeAccount ResourceType = "RESOURCE_TYPE_ACCOUNT"` - `const ResourceTypeIntegration ResourceType = "RESOURCE_TYPE_INTEGRATION"` - `const ResourceTypeWorkflow ResourceType = "RESOURCE_TYPE_WORKFLOW"` - `const ResourceTypeWorkflowExecution ResourceType = "RESOURCE_TYPE_WORKFLOW_EXECUTION"` - `const ResourceTypeWorkflowExecutionAction ResourceType = "RESOURCE_TYPE_WORKFLOW_EXECUTION_ACTION"` - `const ResourceTypeSnapshot ResourceType = "RESOURCE_TYPE_SNAPSHOT"` - `const ResourceTypePrebuild ResourceType = "RESOURCE_TYPE_PREBUILD"` - `const ResourceTypeOrganizationLlmIntegration ResourceType = "RESOURCE_TYPE_ORGANIZATION_LLM_INTEGRATION"` - `const ResourceTypeCustomDomain ResourceType = "RESOURCE_TYPE_CUSTOM_DOMAIN"` - `const ResourceTypeRoleAssignmentChanged ResourceType = "RESOURCE_TYPE_ROLE_ASSIGNMENT_CHANGED"` - `const ResourceTypeGroupMembershipChanged ResourceType = "RESOURCE_TYPE_GROUP_MEMBERSHIP_CHANGED"` - `const ResourceTypeWebhook ResourceType = "RESOURCE_TYPE_WEBHOOK"` - `const ResourceTypeScimConfiguration ResourceType = "RESOURCE_TYPE_SCIM_CONFIGURATION"` - `const ResourceTypeServiceAccountSecret ResourceType = "RESOURCE_TYPE_SERVICE_ACCOUNT_SECRET"` - `const ResourceTypeAnnouncementBanner ResourceType = "RESOURCE_TYPE_ANNOUNCEMENT_BANNER"` - `const ResourceTypeServiceAccountToken ResourceType = "RESOURCE_TYPE_SERVICE_ACCOUNT_TOKEN"` - `const ResourceTypeRoleAssignment ResourceType = "RESOURCE_TYPE_ROLE_ASSIGNMENT"` - `const ResourceTypeWarmPool ResourceType = "RESOURCE_TYPE_WARM_POOL"` - `const ResourceTypeNotification ResourceType = "RESOURCE_TYPE_NOTIFICATION"` ### Runs On - `type RunsOn struct{…}` - `Docker RunsOnDocker` - `Environment []string` - `Image string` - `Machine unknown` Machine runs the service/task directly on the VM/machine level. ### Secret Ref - `type SecretRef struct{…}` SecretRef references a secret by its ID. - `ID string` id is the UUID of the secret to reference. ### Sort - `type Sort struct{…}` - `Field string` Field name to sort by, in camelCase. - `Order SortOrder` - `const SortOrderUnspecified SortOrder = "SORT_ORDER_UNSPECIFIED"` - `const SortOrderAsc SortOrder = "SORT_ORDER_ASC"` - `const SortOrderDesc SortOrder = "SORT_ORDER_DESC"` ### Sort Order - `type SortOrder string` - `const SortOrderUnspecified SortOrder = "SORT_ORDER_UNSPECIFIED"` - `const SortOrderAsc SortOrder = "SORT_ORDER_ASC"` - `const SortOrderDesc SortOrder = "SORT_ORDER_DESC"` ### State - `type State string` Current state of the pull request - `const StateUnspecified State = "STATE_UNSPECIFIED"` - `const StateOpen State = "STATE_OPEN"` - `const StateClosed State = "STATE_CLOSED"` - `const StateMerged State = "STATE_MERGED"` ### Subject - `type Subject struct{…}` - `ID string` id is the UUID of the subject - `Principal Principal` Principal is the principal of the subject - `const PrincipalUnspecified Principal = "PRINCIPAL_UNSPECIFIED"` - `const PrincipalAccount Principal = "PRINCIPAL_ACCOUNT"` - `const PrincipalUser Principal = "PRINCIPAL_USER"` - `const PrincipalRunner Principal = "PRINCIPAL_RUNNER"` - `const PrincipalEnvironment Principal = "PRINCIPAL_ENVIRONMENT"` - `const PrincipalServiceAccount Principal = "PRINCIPAL_SERVICE_ACCOUNT"` - `const PrincipalRunnerManager Principal = "PRINCIPAL_RUNNER_MANAGER"` ### Task - `type Task struct{…}` - `ID string` - `DependsOn []string` dependencies specifies the IDs of the automations this task depends on. - `EnvironmentID string` - `Metadata TaskMetadata` - `CreatedAt Time` created_at is the time the task was created. - `Creator Subject` creator describes the principal who created the task. - `ID string` id is the UUID of the subject - `Principal Principal` Principal is the principal of the subject - `const PrincipalUnspecified Principal = "PRINCIPAL_UNSPECIFIED"` - `const PrincipalAccount Principal = "PRINCIPAL_ACCOUNT"` - `const PrincipalUser Principal = "PRINCIPAL_USER"` - `const PrincipalRunner Principal = "PRINCIPAL_RUNNER"` - `const PrincipalEnvironment Principal = "PRINCIPAL_ENVIRONMENT"` - `const PrincipalServiceAccount Principal = "PRINCIPAL_SERVICE_ACCOUNT"` - `const PrincipalRunnerManager Principal = "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. - `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 []AutomationTrigger` triggered_by is a list of trigger that start the task. - `BeforeSnapshot bool` - `Manual bool` - `PostDevcontainerStart bool` - `PostEnvironmentStart bool` - `PostMachineStart bool` - `Prebuild bool` - `Spec TaskSpec` - `Command string` command contains the command the task should execute - `Env []EnvironmentVariableItem` env specifies environment variables for the task. - `Name string` name is the environment variable name. - `Value string` value is a literal string value. - `ValueFrom EnvironmentVariableSource` value_from specifies a source for the value. - `SecretRef SecretRef` secret_ref references a secret by ID. - `ID string` id is the UUID of the secret to reference. - `RunsOn RunsOn` runs_on specifies the environment the task should run on. - `Docker RunsOnDocker` - `Environment []string` - `Image string` - `Machine unknown` Machine runs the service/task directly on the VM/machine level. ### Task Execution - `type TaskExecution struct{…}` - `ID string` - `Metadata TaskExecutionMetadata` - `CompletedAt Time` completed_at is the time the task execution was done. - `CreatedAt Time` created_at is the time the task was created. - `Creator Subject` creator describes the principal who created/started the task run. - `ID string` id is the UUID of the subject - `Principal Principal` Principal is the principal of the subject - `const PrincipalUnspecified Principal = "PRINCIPAL_UNSPECIFIED"` - `const PrincipalAccount Principal = "PRINCIPAL_ACCOUNT"` - `const PrincipalUser Principal = "PRINCIPAL_USER"` - `const PrincipalRunner Principal = "PRINCIPAL_RUNNER"` - `const PrincipalEnvironment Principal = "PRINCIPAL_ENVIRONMENT"` - `const PrincipalServiceAccount Principal = "PRINCIPAL_SERVICE_ACCOUNT"` - `const PrincipalRunnerManager Principal = "PRINCIPAL_RUNNER_MANAGER"` - `EnvironmentID string` environment_id is the ID of the environment in which the task run is executed. - `StartedAt Time` started_at is the time the task execution actually started to run. - `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. - `Spec TaskExecutionSpec` - `DesiredPhase TaskExecutionPhase` desired_phase is the phase the task execution should be in. Used to stop a running task execution early. - `const TaskExecutionPhaseUnspecified TaskExecutionPhase = "TASK_EXECUTION_PHASE_UNSPECIFIED"` - `const TaskExecutionPhasePending TaskExecutionPhase = "TASK_EXECUTION_PHASE_PENDING"` - `const TaskExecutionPhaseRunning TaskExecutionPhase = "TASK_EXECUTION_PHASE_RUNNING"` - `const TaskExecutionPhaseSucceeded TaskExecutionPhase = "TASK_EXECUTION_PHASE_SUCCEEDED"` - `const TaskExecutionPhaseFailed TaskExecutionPhase = "TASK_EXECUTION_PHASE_FAILED"` - `const TaskExecutionPhaseStopped TaskExecutionPhase = "TASK_EXECUTION_PHASE_STOPPED"` - `Plan []TaskExecutionSpecPlan` 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 []TaskExecutionSpecPlanStep` - `ID string` ID is the ID of the execution step - `DependsOn []string` - `Label string` - `ServiceID string` - `Task TaskExecutionSpecPlanStepsTask` - `ID string` - `Spec TaskSpec` - `Command string` command contains the command the task should execute - `Env []EnvironmentVariableItem` env specifies environment variables for the task. - `Name string` name is the environment variable name. - `Value string` value is a literal string value. - `ValueFrom EnvironmentVariableSource` value_from specifies a source for the value. - `SecretRef SecretRef` secret_ref references a secret by ID. - `ID string` id is the UUID of the secret to reference. - `RunsOn RunsOn` runs_on specifies the environment the task should run on. - `Docker RunsOnDocker` - `Environment []string` - `Image string` - `Machine unknown` Machine runs the service/task directly on the VM/machine level. - `Status TaskExecutionStatus` - `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. - `Phase TaskExecutionPhase` the phase of a task execution represents the aggregated phase of all steps. - `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 []TaskExecutionStatusStep` 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 - `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 map[string, string]` output contains the output of the task execution. setting an output field to empty string will unset it. - `Phase TaskExecutionPhase` phase is the current phase of the execution step ### Task Execution Metadata - `type TaskExecutionMetadata struct{…}` - `CompletedAt Time` completed_at is the time the task execution was done. - `CreatedAt Time` created_at is the time the task was created. - `Creator Subject` creator describes the principal who created/started the task run. - `ID string` id is the UUID of the subject - `Principal Principal` Principal is the principal of the subject - `const PrincipalUnspecified Principal = "PRINCIPAL_UNSPECIFIED"` - `const PrincipalAccount Principal = "PRINCIPAL_ACCOUNT"` - `const PrincipalUser Principal = "PRINCIPAL_USER"` - `const PrincipalRunner Principal = "PRINCIPAL_RUNNER"` - `const PrincipalEnvironment Principal = "PRINCIPAL_ENVIRONMENT"` - `const PrincipalServiceAccount Principal = "PRINCIPAL_SERVICE_ACCOUNT"` - `const PrincipalRunnerManager Principal = "PRINCIPAL_RUNNER_MANAGER"` - `EnvironmentID string` environment_id is the ID of the environment in which the task run is executed. - `StartedAt Time` started_at is the time the task execution actually started to run. - `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. ### Task Execution Phase - `type TaskExecutionPhase string` - `const TaskExecutionPhaseUnspecified TaskExecutionPhase = "TASK_EXECUTION_PHASE_UNSPECIFIED"` - `const TaskExecutionPhasePending TaskExecutionPhase = "TASK_EXECUTION_PHASE_PENDING"` - `const TaskExecutionPhaseRunning TaskExecutionPhase = "TASK_EXECUTION_PHASE_RUNNING"` - `const TaskExecutionPhaseSucceeded TaskExecutionPhase = "TASK_EXECUTION_PHASE_SUCCEEDED"` - `const TaskExecutionPhaseFailed TaskExecutionPhase = "TASK_EXECUTION_PHASE_FAILED"` - `const TaskExecutionPhaseStopped TaskExecutionPhase = "TASK_EXECUTION_PHASE_STOPPED"` ### Task Execution Spec - `type TaskExecutionSpec struct{…}` - `DesiredPhase TaskExecutionPhase` desired_phase is the phase the task execution should be in. Used to stop a running task execution early. - `const TaskExecutionPhaseUnspecified TaskExecutionPhase = "TASK_EXECUTION_PHASE_UNSPECIFIED"` - `const TaskExecutionPhasePending TaskExecutionPhase = "TASK_EXECUTION_PHASE_PENDING"` - `const TaskExecutionPhaseRunning TaskExecutionPhase = "TASK_EXECUTION_PHASE_RUNNING"` - `const TaskExecutionPhaseSucceeded TaskExecutionPhase = "TASK_EXECUTION_PHASE_SUCCEEDED"` - `const TaskExecutionPhaseFailed TaskExecutionPhase = "TASK_EXECUTION_PHASE_FAILED"` - `const TaskExecutionPhaseStopped TaskExecutionPhase = "TASK_EXECUTION_PHASE_STOPPED"` - `Plan []TaskExecutionSpecPlan` 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 []TaskExecutionSpecPlanStep` - `ID string` ID is the ID of the execution step - `DependsOn []string` - `Label string` - `ServiceID string` - `Task TaskExecutionSpecPlanStepsTask` - `ID string` - `Spec TaskSpec` - `Command string` command contains the command the task should execute - `Env []EnvironmentVariableItem` env specifies environment variables for the task. - `Name string` name is the environment variable name. - `Value string` value is a literal string value. - `ValueFrom EnvironmentVariableSource` value_from specifies a source for the value. - `SecretRef SecretRef` secret_ref references a secret by ID. - `ID string` id is the UUID of the secret to reference. - `RunsOn RunsOn` runs_on specifies the environment the task should run on. - `Docker RunsOnDocker` - `Environment []string` - `Image string` - `Machine unknown` Machine runs the service/task directly on the VM/machine level. ### Task Execution Status - `type TaskExecutionStatus struct{…}` - `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. - `Phase TaskExecutionPhase` the phase of a task execution represents the aggregated phase of all steps. - `const TaskExecutionPhaseUnspecified TaskExecutionPhase = "TASK_EXECUTION_PHASE_UNSPECIFIED"` - `const TaskExecutionPhasePending TaskExecutionPhase = "TASK_EXECUTION_PHASE_PENDING"` - `const TaskExecutionPhaseRunning TaskExecutionPhase = "TASK_EXECUTION_PHASE_RUNNING"` - `const TaskExecutionPhaseSucceeded TaskExecutionPhase = "TASK_EXECUTION_PHASE_SUCCEEDED"` - `const TaskExecutionPhaseFailed TaskExecutionPhase = "TASK_EXECUTION_PHASE_FAILED"` - `const TaskExecutionPhaseStopped TaskExecutionPhase = "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 []TaskExecutionStatusStep` 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 - `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 map[string, string]` output contains the output of the task execution. setting an output field to empty string will unset it. - `Phase TaskExecutionPhase` phase is the current phase of the execution step ### Task Metadata - `type TaskMetadata struct{…}` - `CreatedAt Time` created_at is the time the task was created. - `Creator Subject` creator describes the principal who created the task. - `ID string` id is the UUID of the subject - `Principal Principal` Principal is the principal of the subject - `const PrincipalUnspecified Principal = "PRINCIPAL_UNSPECIFIED"` - `const PrincipalAccount Principal = "PRINCIPAL_ACCOUNT"` - `const PrincipalUser Principal = "PRINCIPAL_USER"` - `const PrincipalRunner Principal = "PRINCIPAL_RUNNER"` - `const PrincipalEnvironment Principal = "PRINCIPAL_ENVIRONMENT"` - `const PrincipalServiceAccount Principal = "PRINCIPAL_SERVICE_ACCOUNT"` - `const PrincipalRunnerManager Principal = "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. - `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 []AutomationTrigger` triggered_by is a list of trigger that start the task. - `BeforeSnapshot bool` - `Manual bool` - `PostDevcontainerStart bool` - `PostEnvironmentStart bool` - `PostMachineStart bool` - `Prebuild bool` ### Task Spec - `type TaskSpec struct{…}` - `Command string` command contains the command the task should execute - `Env []EnvironmentVariableItem` env specifies environment variables for the task. - `Name string` name is the environment variable name. - `Value string` value is a literal string value. - `ValueFrom EnvironmentVariableSource` value_from specifies a source for the value. - `SecretRef SecretRef` secret_ref references a secret by ID. - `ID string` id is the UUID of the secret to reference. - `RunsOn RunsOn` runs_on specifies the environment the task should run on. - `Docker RunsOnDocker` - `Environment []string` - `Image string` - `Machine unknown` Machine runs the service/task directly on the VM/machine level. ### User Status - `type UserStatus string` - `const UserStatusUnspecified UserStatus = "USER_STATUS_UNSPECIFIED"` - `const UserStatusActive UserStatus = "USER_STATUS_ACTIVE"` - `const UserStatusSuspended UserStatus = "USER_STATUS_SUSPENDED"` - `const UserStatusLeft UserStatus = "USER_STATUS_LEFT"`