@Generated public class SharesAPI extends Object
Constructor and Description |
---|
SharesAPI(ApiClient apiClient)
Regular-use constructor
|
SharesAPI(SharesService mock)
Constructor for mocks
|
Modifier and Type | Method and Description |
---|---|
ShareInfo |
create(CreateShare request)
Create a share.
|
ShareInfo |
create(String name) |
void |
delete(DeleteShareRequest request)
Delete a share.
|
void |
delete(String name) |
ShareInfo |
get(GetShareRequest request)
Get a share.
|
ShareInfo |
get(String name) |
SharesService |
impl() |
Iterable<ShareInfo> |
list()
List shares.
|
PermissionsList |
sharePermissions(SharePermissionsRequest request)
Get permissions.
|
PermissionsList |
sharePermissions(String name) |
ShareInfo |
update(String name) |
ShareInfo |
update(UpdateShare request)
Update a share.
|
void |
updatePermissions(String name) |
void |
updatePermissions(UpdateSharePermissions request)
Update permissions.
|
public SharesAPI(ApiClient apiClient)
public SharesAPI(SharesService mock)
public ShareInfo create(CreateShare request)
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.
public void delete(String name)
public void delete(DeleteShareRequest request)
Deletes a data object share from the metastore. The caller must be an owner of the share.
public ShareInfo get(GetShareRequest request)
Gets a data object share from the metastore. The caller must be a metastore admin or the owner of the share.
public Iterable<ShareInfo> 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.
public PermissionsList sharePermissions(String name)
public PermissionsList sharePermissions(SharePermissionsRequest request)
Gets the permissions for a data share from the metastore. The caller must be a metastore admin or the owner of the share.
public ShareInfo update(UpdateShare request)
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.
public void updatePermissions(String name)
public void updatePermissions(UpdateSharePermissions request)
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.
public SharesService impl()
Copyright © 2023. All rights reserved.