feat: allow disabling autostart and custom autostop for template (#6933)

API only, frontend in upcoming PR.
This commit is contained in:
Dean Sheather
2023-04-04 22:48:35 +10:00
committed by GitHub
parent 083fc89f93
commit e33941b7c2
65 changed files with 1433 additions and 486 deletions

View File

@ -95,6 +95,17 @@ type CreateTemplateRequest struct {
// Allow users to cancel in-progress workspace jobs.
// *bool as the default value is "true".
AllowUserCancelWorkspaceJobs *bool `json:"allow_user_cancel_workspace_jobs"`
// AllowUserAutostart allows users to set a schedule for autostarting their
// workspace. By default this is true. This can only be disabled when using
// an enterprise license.
AllowUserAutostart *bool `json:"allow_user_autostart"`
// AllowUserAutostop allows users to set a custom workspace TTL to use in
// place of the template's DefaultTTL field. By default this is true. If
// false, the DefaultTTL will always be used. This can only be disabled when
// using an enterprise license.
AllowUserAutostop *bool `json:"allow_user_autostop"`
}
// CreateWorkspaceRequest provides options for creating a new workspace.