MCPcopy Create free account
hub / github.com/coder/coder / PutPrebuildsSettings

Method PutPrebuildsSettings

codersdk/prebuilds.go:37–51  ·  view source on GitHub ↗

PutPrebuildsSettings modifies the prebuilds settings, which currently just controls whether all prebuild reconciliation is paused.

(ctx context.Context, settings PrebuildsSettings)

Source from the content-addressed store, hash-verified

35// PutPrebuildsSettings modifies the prebuilds settings, which currently just controls whether all
36// prebuild reconciliation is paused.
37func (c *Client) PutPrebuildsSettings(ctx context.Context, settings PrebuildsSettings) error {
38 res, err := c.Request(ctx, http.MethodPut, "/api/v2/prebuilds/settings", settings)
39 if err != nil {
40 return err
41 }
42 defer res.Body.Close()
43
44 if res.StatusCode == http.StatusNotModified {
45 return nil
46 }
47 if res.StatusCode != http.StatusOK {
48 return ReadBodyAsError(res)
49 }
50 return nil
51}

Callers 5

scaletestPrebuildsMethod · 0.80
scaletestCleanupMethod · 0.80
pausePrebuildsMethod · 0.80
resumePrebuildsMethod · 0.80
TestRunFunction · 0.80

Calls 3

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65

Tested by 1

TestRunFunction · 0.64