feat: add locked TTL field to template meta (#8020)

This commit is contained in:
Jon Ayers
2023-06-19 22:37:55 -04:00
committed by GitHub
parent 1ecc371ade
commit c3aef9363b
27 changed files with 291 additions and 90 deletions
+4 -1
View File
@@ -106,8 +106,11 @@ type CreateTemplateRequest struct {
// stops all resources for failed workspaces created from this template.
FailureTTLMillis *int64 `json:"failure_ttl_ms,omitempty"`
// InactivityTTLMillis allows optionally specifying the max lifetime before Coder
// deletes inactive workspaces created from this template.
// locks inactive workspaces created from this template.
InactivityTTLMillis *int64 `json:"inactivity_ttl_ms,omitempty"`
// LockedTTL allows optionally specifying the max lifetime before Coder
// permanently deletes locked workspaces created from this template.
LockedTTL *int64 `json:"locked_ttl_ms,omitempty"`
// DisableEveryoneGroupAccess allows optionally disabling the default
// behavior of granting the 'everyone' group access to use the template.
+3 -1
View File
@@ -41,11 +41,12 @@ type Template struct {
AllowUserAutostop bool `json:"allow_user_autostop"`
AllowUserCancelWorkspaceJobs bool `json:"allow_user_cancel_workspace_jobs"`
// FailureTTLMillis and InactivityTTLMillis are enterprise-only. Their
// FailureTTLMillis, InactivityTTLMillis, and LockedTTLMillis are enterprise-only. Their
// values are used if your license is entitled to use the advanced
// template scheduling feature.
FailureTTLMillis int64 `json:"failure_ttl_ms"`
InactivityTTLMillis int64 `json:"inactivity_ttl_ms"`
LockedTTLMillis int64 `json:"locked_ttl_ms"`
}
type TransitionStats struct {
@@ -103,6 +104,7 @@ type UpdateTemplateMeta struct {
AllowUserCancelWorkspaceJobs bool `json:"allow_user_cancel_workspace_jobs,omitempty"`
FailureTTLMillis int64 `json:"failure_ttl_ms,omitempty"`
InactivityTTLMillis int64 `json:"inactivity_ttl_ms,omitempty"`
LockedTTLMillis int64 `json:"locked_ttl_ms,omitempty"`
}
type TemplateExample struct {