We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentff80571 commit3b4664cCopy full SHA for 3b4664c
codersdk/workspaces.go
@@ -90,10 +90,13 @@ func (c *Client) WorkspaceBuildByName(ctx context.Context, workspace uuid.UUID,
90
returnworkspaceBuild,json.NewDecoder(res.Body).Decode(&workspaceBuild)
91
}
92
93
+// UpdateWorkspaceAutostartRequest is a request to update a workspace's autostart schedule.
94
typeUpdateWorkspaceAutostartRequeststruct {
95
Schedulestring
96
97
98
+// UpdateWorkspaceAutostart sets the autostart schedule for workspace by id.
99
+// If the provided schedule is empty, autostart is disabled for the workspace.
100
func (c*Client)UpdateWorkspaceAutostart(ctx context.Context,id uuid.UUID,reqUpdateWorkspaceAutostartRequest)error {
101
path:=fmt.Sprintf("/api/v2/workspaces/%s/autostart",id.String())
102
res,err:=c.request(ctx,http.MethodPut,path,req)