MCPcopy Index your code
hub / github.com/coder/coder / PatchGroupIDPSyncSettings

Method PatchGroupIDPSyncSettings

codersdk/idpsync.go:57–69  ·  view source on GitHub ↗
(ctx context.Context, orgID string, req GroupSyncSettings)

Source from the content-addressed store, hash-verified

55}
56
57func (c *Client) PatchGroupIDPSyncSettings(ctx context.Context, orgID string, req GroupSyncSettings) (GroupSyncSettings, error) {
58 res, err := c.Request(ctx, http.MethodPatch, fmt.Sprintf("/api/v2/organizations/%s/settings/idpsync/groups", orgID), req)
59 if err != nil {
60 return GroupSyncSettings{}, xerrors.Errorf("make request: %w", err)
61 }
62 defer res.Body.Close()
63
64 if res.StatusCode != http.StatusOK {
65 return GroupSyncSettings{}, ReadBodyAsError(res)
66 }
67 var resp GroupSyncSettings
68 return resp, json.NewDecoder(res.Body).Decode(&resp)
69}
70
71type PatchGroupIDPSyncConfigRequest struct {
72 Field string `json:"field"`

Callers 4

organizationSettingsMethod · 0.80
TestPatchGroupSyncConfigFunction · 0.80

Calls 4

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
ErrorfMethod · 0.45

Tested by 3

TestPatchGroupSyncConfigFunction · 0.64