diff --git a/sharing/resource_share.go b/sharing/resource_share.go index afd76efb30..89db3b4e49 100644 --- a/sharing/resource_share.go +++ b/sharing/resource_share.go @@ -11,15 +11,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -type SharesAPI struct { - client *common.DatabricksClient - context context.Context -} - -func NewSharesAPI(ctx context.Context, m any) SharesAPI { - return SharesAPI{m.(*common.DatabricksClient), context.WithValue(ctx, common.Api, common.API_2_1)} -} - const ( ShareAdd = "ADD" ShareRemove = "REMOVE" @@ -102,18 +93,6 @@ func (si *ShareInfo) suppressCDFEnabledDiff() { } } -func (a SharesAPI) get(name string) (si ShareInfo, err error) { - err = a.client.Get(a.context, "/unity-catalog/shares/"+name+"?include_shared_data=true", nil, &si) - return -} - -func (a SharesAPI) update(name string, su sharing.UpdateShare) error { - if len(su.Updates) == 0 { - return nil - } - return a.client.Patch(a.context, "/unity-catalog/shares/"+name, su) -} - func (si ShareInfo) shareChanges(action string) sharing.UpdateShare { var changes []sharing.SharedDataObjectUpdate for _, obj := range si.Objects {