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

Method PatchRoleIDPSyncMapping

codersdk/idpsync.go:171–183  ·  view source on GitHub ↗
(ctx context.Context, orgID string, req PatchRoleIDPSyncMappingRequest)

Source from the content-addressed store, hash-verified

169}
170
171func (c *Client) PatchRoleIDPSyncMapping(ctx context.Context, orgID string, req PatchRoleIDPSyncMappingRequest) (RoleSyncSettings, error) {
172 res, err := c.Request(ctx, http.MethodPatch, fmt.Sprintf("/api/v2/organizations/%s/settings/idpsync/roles/mapping", orgID), req)
173 if err != nil {
174 return RoleSyncSettings{}, xerrors.Errorf("make request: %w", err)
175 }
176 defer res.Body.Close()
177
178 if res.StatusCode != http.StatusOK {
179 return RoleSyncSettings{}, ReadBodyAsError(res)
180 }
181 var resp RoleSyncSettings
182 return resp, json.NewDecoder(res.Body).Decode(&resp)
183}
184
185type OrganizationSyncSettings struct {
186 // Field selects the claim field to be used as the created user's

Callers 1

TestPatchRoleSyncMappingFunction · 0.80

Calls 4

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

Tested by 1

TestPatchRoleSyncMappingFunction · 0.64