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

Method PatchRoleIDPSyncConfig

codersdk/idpsync.go:151–163  ·  view source on GitHub ↗
(ctx context.Context, orgID string, req PatchRoleIDPSyncConfigRequest)

Source from the content-addressed store, hash-verified

149}
150
151func (c *Client) PatchRoleIDPSyncConfig(ctx context.Context, orgID string, req PatchRoleIDPSyncConfigRequest) (RoleSyncSettings, error) {
152 res, err := c.Request(ctx, http.MethodPatch, fmt.Sprintf("/api/v2/organizations/%s/settings/idpsync/roles/config", orgID), req)
153 if err != nil {
154 return RoleSyncSettings{}, xerrors.Errorf("make request: %w", err)
155 }
156 defer res.Body.Close()
157
158 if res.StatusCode != http.StatusOK {
159 return RoleSyncSettings{}, ReadBodyAsError(res)
160 }
161 var resp RoleSyncSettings
162 return resp, json.NewDecoder(res.Body).Decode(&resp)
163}
164
165// If the same mapping is present in both Add and Remove, Remove will take presidence.
166type PatchRoleIDPSyncMappingRequest struct {

Callers 1

TestPatchRoleSyncConfigFunction · 0.80

Calls 4

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

Tested by 1

TestPatchRoleSyncConfigFunction · 0.64