@Generated public class StorageCredentialsAPI extends Object
Databricks recommends using external locations rather than using storage credentials directly.
To create storage credentials, you must be a Databricks account admin. The account admin who creates the storage credential can delegate ownership to another user or group to manage permissions on it.
Constructor and Description |
---|
StorageCredentialsAPI(ApiClient apiClient)
Regular-use constructor
|
StorageCredentialsAPI(StorageCredentialsService mock)
Constructor for mocks
|
Modifier and Type | Method and Description |
---|---|
StorageCredentialInfo |
create(CreateStorageCredential request)
Create a storage credential.
|
StorageCredentialInfo |
create(String name) |
void |
delete(DeleteStorageCredentialRequest request)
Delete a credential.
|
void |
delete(String name) |
StorageCredentialInfo |
get(GetStorageCredentialRequest request)
Get a credential.
|
StorageCredentialInfo |
get(String name) |
StorageCredentialsService |
impl() |
Iterable<StorageCredentialInfo> |
list()
List credentials.
|
StorageCredentialInfo |
update(String name) |
StorageCredentialInfo |
update(UpdateStorageCredential request)
Update a credential.
|
ValidateStorageCredentialResponse |
validate(ValidateStorageCredential request)
Validate a storage credential.
|
public StorageCredentialsAPI(ApiClient apiClient)
public StorageCredentialsAPI(StorageCredentialsService mock)
public StorageCredentialInfo create(String name)
public StorageCredentialInfo create(CreateStorageCredential request)
Creates a new storage credential.
public void delete(String name)
public void delete(DeleteStorageCredentialRequest request)
Deletes a storage credential from the metastore. The caller must be an owner of the storage credential.
public StorageCredentialInfo get(String name)
public StorageCredentialInfo get(GetStorageCredentialRequest request)
Gets a storage credential from the metastore. The caller must be a metastore admin, the owner of the storage credential, or have some permission on the storage credential.
public Iterable<StorageCredentialInfo> list()
Gets an array of storage credentials (as __StorageCredentialInfo__ objects). The array is limited to only those storage credentials the caller has permission to access. If the caller is a metastore admin, all storage credentials will be retrieved. There is no guarantee of a specific ordering of the elements in the array.
public StorageCredentialInfo update(String name)
public StorageCredentialInfo update(UpdateStorageCredential request)
Updates a storage credential on the metastore.
public ValidateStorageCredentialResponse validate(ValidateStorageCredential request)
Validates a storage credential. At least one of __external_location_name__ and __url__ need to be provided. If only one of them is provided, it will be used for validation. And if both are provided, the __url__ will be used for validation, and __external_location_name__ will be ignored when checking overlapping urls.
Either the __storage_credential_name__ or the cloud-specific credential must be provided.
The caller must be a metastore admin or the storage credential owner or have the **CREATE_EXTERNAL_LOCATION** privilege on the metastore and the storage credential.
public StorageCredentialsService impl()
Copyright © 2023. All rights reserved.