@Generated public class RecipientsAPI extends Object
- For recipients with access to a Databricks workspace that is enabled for Unity Catalog, you can create a recipient object along with a unique sharing identifier you get from the recipient. The sharing identifier is the key identifier that enables the secure connection. This sharing mode is called **Databricks-to-Databricks sharing**.
- For recipients without access to a Databricks workspace that is enabled for Unity Catalog, when you create a recipient object, Databricks generates an activation link you can send to the recipient. The recipient follows the activation link to download the credential file, and then uses the credential file to establish a secure connection to receive the shared data. This sharing mode is called **open sharing**.
Constructor and Description |
---|
RecipientsAPI(ApiClient apiClient)
Regular-use constructor
|
RecipientsAPI(RecipientsService mock)
Constructor for mocks
|
Modifier and Type | Method and Description |
---|---|
RecipientInfo |
create(CreateRecipient request)
Create a share recipient.
|
RecipientInfo |
create(String name,
AuthenticationType authenticationType) |
void |
delete(DeleteRecipientRequest request)
Delete a share recipient.
|
void |
delete(String name) |
RecipientInfo |
get(GetRecipientRequest request)
Get a share recipient.
|
RecipientInfo |
get(String name) |
RecipientsService |
impl() |
Iterable<RecipientInfo> |
list(ListRecipientsRequest request)
List share recipients.
|
RecipientInfo |
rotateToken(RotateRecipientToken request)
Rotate a token.
|
RecipientInfo |
rotateToken(String name,
long existingTokenExpireInSeconds) |
GetRecipientSharePermissionsResponse |
sharePermissions(SharePermissionsRequest request)
Get recipient share permissions.
|
GetRecipientSharePermissionsResponse |
sharePermissions(String name) |
void |
update(String name) |
void |
update(UpdateRecipient request)
Update a share recipient.
|
public RecipientsAPI(ApiClient apiClient)
public RecipientsAPI(RecipientsService mock)
public RecipientInfo create(String name, AuthenticationType authenticationType)
public RecipientInfo create(CreateRecipient request)
Creates a new recipient with the delta sharing authentication type in the metastore. The caller must be a metastore admin or has the **CREATE_RECIPIENT** privilege on the metastore.
public void delete(String name)
public void delete(DeleteRecipientRequest request)
Deletes the specified recipient from the metastore. The caller must be the owner of the recipient.
public RecipientInfo get(String name)
public RecipientInfo get(GetRecipientRequest request)
Gets a share recipient from the metastore if:
* the caller is the owner of the share recipient, or: * is a metastore admin
public Iterable<RecipientInfo> list(ListRecipientsRequest request)
Gets an array of all share recipients within the current metastore where:
* the caller is a metastore admin, or * the caller is the owner. There is no guarantee of a specific ordering of the elements in the array.
public RecipientInfo rotateToken(String name, long existingTokenExpireInSeconds)
public RecipientInfo rotateToken(RotateRecipientToken request)
Refreshes the specified recipient's delta sharing authentication token with the provided token info. The caller must be the owner of the recipient.
public GetRecipientSharePermissionsResponse sharePermissions(String name)
public GetRecipientSharePermissionsResponse sharePermissions(SharePermissionsRequest request)
Gets the share permissions for the specified Recipient. The caller must be a metastore admin or the owner of the Recipient.
public void update(String name)
public void update(UpdateRecipient request)
Updates an existing recipient in the metastore. The caller must be a metastore admin or the owner of the recipient. If the recipient name will be updated, the user must be both a metastore admin and the owner of the recipient.
public RecipientsService impl()
Copyright © 2024. All rights reserved.