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

Method PatchGroupIDPSyncMapping

codersdk/idpsync.go:97–109  ·  view source on GitHub ↗
(ctx context.Context, orgID string, req PatchGroupIDPSyncMappingRequest)

Source from the content-addressed store, hash-verified

95}
96
97func (c *Client) PatchGroupIDPSyncMapping(ctx context.Context, orgID string, req PatchGroupIDPSyncMappingRequest) (GroupSyncSettings, error) {
98 res, err := c.Request(ctx, http.MethodPatch, fmt.Sprintf("/api/v2/organizations/%s/settings/idpsync/groups/mapping", orgID), req)
99 if err != nil {
100 return GroupSyncSettings{}, xerrors.Errorf("make request: %w", err)
101 }
102 defer res.Body.Close()
103
104 if res.StatusCode != http.StatusOK {
105 return GroupSyncSettings{}, ReadBodyAsError(res)
106 }
107 var resp GroupSyncSettings
108 return resp, json.NewDecoder(res.Body).Decode(&resp)
109}
110
111type RoleSyncSettings struct {
112 // Field is the name of the claim field that specifies what organization roles

Callers 2

TestPatchRoleSyncMappingFunction · 0.80

Calls 4

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

Tested by 2

TestPatchRoleSyncMappingFunction · 0.64