@Generated public interface SharesService
This is the high-level interface, that contains generated methods.
Evolving: this interface is under development. Method signatures may change.
Modifier and Type | Method and Description |
---|---|
ShareInfo |
create(CreateShare createShare)
Create a share.
|
void |
delete(DeleteShareRequest deleteShareRequest)
Delete a share.
|
ShareInfo |
get(GetShareRequest getShareRequest)
Get a share.
|
ListSharesResponse |
list()
List shares.
|
PermissionsList |
sharePermissions(SharePermissionsRequest sharePermissionsRequest)
Get permissions.
|
ShareInfo |
update(UpdateShare updateShare)
Update a share.
|
void |
updatePermissions(UpdateSharePermissions updateSharePermissions)
Update permissions.
|
ShareInfo create(CreateShare createShare)
Creates a new share for data objects. Data objects can be added after creation with **update**. The caller must be a metastore admin or have the **CREATE_SHARE** privilege on the metastore.
void delete(DeleteShareRequest deleteShareRequest)
Deletes a data object share from the metastore. The caller must be an owner of the share.
ShareInfo get(GetShareRequest getShareRequest)
Gets a data object share from the metastore. The caller must be a metastore admin or the owner of the share.
ListSharesResponse list()
Gets an array of data object shares from the metastore. The caller must be a metastore admin or the owner of the share. There is no guarantee of a specific ordering of the elements in the array.
PermissionsList sharePermissions(SharePermissionsRequest sharePermissionsRequest)
Gets the permissions for a data share from the metastore. The caller must be a metastore admin or the owner of the share.
ShareInfo update(UpdateShare updateShare)
Updates the share with the changes and data objects in the request. The caller must be the owner of the share or a metastore admin.
When the caller is a metastore admin, only the __owner__ field can be updated.
In the case that the share name is changed, **updateShare** requires that the caller is both the share owner and a metastore admin.
For each table that is added through this method, the share owner must also have **SELECT** privilege on the table. This privilege must be maintained indefinitely for recipients to be able to access the table. Typically, you should use a group as the share owner.
Table removals through **update** do not require additional privileges.
void updatePermissions(UpdateSharePermissions updateSharePermissions)
Updates the permissions for a data share in the metastore. The caller must be a metastore admin or an owner of the share.
For new recipient grants, the user must also be the owner of the recipients. recipient revocations do not require additional privileges.
Copyright © 2023. All rights reserved.