mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
feat: create a workspace from any template version (#9471)
This commit is contained in:
@ -124,12 +124,16 @@ type CreateTemplateRequest struct {
|
||||
}
|
||||
|
||||
// CreateWorkspaceRequest provides options for creating a new workspace.
|
||||
// Either TemplateID or TemplateVersionID must be specified. They cannot both be present.
|
||||
type CreateWorkspaceRequest struct {
|
||||
TemplateID uuid.UUID `json:"template_id" validate:"required" format:"uuid"`
|
||||
// TemplateID specifies which template should be used for creating the workspace.
|
||||
TemplateID uuid.UUID `json:"template_id,omitempty" validate:"required_without=TemplateVersionID,excluded_with=TemplateVersionID" format:"uuid"`
|
||||
// TemplateVersionID can be used to specify a specific version of a template for creating the workspace.
|
||||
TemplateVersionID uuid.UUID `json:"template_version_id,omitempty" validate:"required_without=TemplateID,excluded_with=TemplateID" format:"uuid"`
|
||||
Name string `json:"name" validate:"workspace_name,required"`
|
||||
AutostartSchedule *string `json:"autostart_schedule"`
|
||||
TTLMillis *int64 `json:"ttl_ms,omitempty"`
|
||||
// ParameterValues allows for additional parameters to be provided
|
||||
// RichParameterValues allows for additional parameters to be provided
|
||||
// during the initial provision.
|
||||
RichParameterValues []WorkspaceBuildParameter `json:"rich_parameter_values,omitempty"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user