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

Method PatchOrganizationIDPSyncConfig

codersdk/idpsync.go:230–242  ·  view source on GitHub ↗
(ctx context.Context, req PatchOrganizationIDPSyncConfigRequest)

Source from the content-addressed store, hash-verified

228}
229
230func (c *Client) PatchOrganizationIDPSyncConfig(ctx context.Context, req PatchOrganizationIDPSyncConfigRequest) (OrganizationSyncSettings, error) {
231 res, err := c.Request(ctx, http.MethodPatch, "/api/v2/settings/idpsync/organization/config", req)
232 if err != nil {
233 return OrganizationSyncSettings{}, xerrors.Errorf("make request: %w", err)
234 }
235 defer res.Body.Close()
236
237 if res.StatusCode != http.StatusOK {
238 return OrganizationSyncSettings{}, ReadBodyAsError(res)
239 }
240 var resp OrganizationSyncSettings
241 return resp, json.NewDecoder(res.Body).Decode(&resp)
242}
243
244// If the same mapping is present in both Add and Remove, Remove will take presidence.
245type PatchOrganizationIDPSyncMappingRequest struct {

Callers 1

Calls 4

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

Tested by 1