@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)
Creates a new storage credential.
|
void |
delete(DeleteStorageCredentialRequest request)
Deletes a storage credential from the metastore.
|
void |
delete(String name) |
StorageCredentialInfo |
get(GetStorageCredentialRequest request)
Gets a storage credential from the metastore.
|
StorageCredentialInfo |
get(String name) |
StorageCredentialsService |
impl() |
Iterable<StorageCredentialInfo> |
list(ListStorageCredentialsRequest request)
Gets an array of storage credentials (as __StorageCredentialInfo__ objects).
|
StorageCredentialInfo |
update(UpdateStorageCredential request)
Updates a storage credential on the metastore.
|
ValidateStorageCredentialResponse |
validate(ValidateStorageCredential request)
Validates a storage credential.
|
public StorageCredentialsAPI(ApiClient apiClient)
public StorageCredentialsAPI(StorageCredentialsService mock)
public StorageCredentialInfo create(CreateStorageCredential request)
The caller must be a metastore admin or have the **CREATE_STORAGE_CREDENTIAL** privilege on the metastore.
public void delete(String name)
public void delete(DeleteStorageCredentialRequest request)
public StorageCredentialInfo get(String name)
public StorageCredentialInfo get(GetStorageCredentialRequest request)
public Iterable<StorageCredentialInfo> list(ListStorageCredentialsRequest request)
NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
public StorageCredentialInfo update(UpdateStorageCredential request)
The caller must be the owner of the storage credential or a metastore admin. If the caller is a metastore admin, only the **owner** field can be changed.
public ValidateStorageCredentialResponse validate(ValidateStorageCredential request)
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 © 2026. All rights reserved.