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

Method PatchGroupIDPSyncConfig

codersdk/idpsync.go:77–89  ·  view source on GitHub ↗
(ctx context.Context, orgID string, req PatchGroupIDPSyncConfigRequest)

Source from the content-addressed store, hash-verified

75}
76
77func (c *Client) PatchGroupIDPSyncConfig(ctx context.Context, orgID string, req PatchGroupIDPSyncConfigRequest) (GroupSyncSettings, error) {
78 res, err := c.Request(ctx, http.MethodPatch, fmt.Sprintf("/api/v2/organizations/%s/settings/idpsync/groups/config", orgID), req)
79 if err != nil {
80 return GroupSyncSettings{}, xerrors.Errorf("make request: %w", err)
81 }
82 defer res.Body.Close()
83
84 if res.StatusCode != http.StatusOK {
85 return GroupSyncSettings{}, ReadBodyAsError(res)
86 }
87 var resp GroupSyncSettings
88 return resp, json.NewDecoder(res.Body).Decode(&resp)
89}
90
91// If the same mapping is present in both Add and Remove, Remove will take presidence.
92type PatchGroupIDPSyncMappingRequest struct {

Callers 2

TestPatchGroupSyncConfigFunction · 0.80
TestPatchRoleSyncConfigFunction · 0.80

Calls 4

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

Tested by 2

TestPatchGroupSyncConfigFunction · 0.64
TestPatchRoleSyncConfigFunction · 0.64