@Generated public class ExternalLocationsAPI extends Object
Databricks recommends using external locations rather than using storage credentials directly.
To create external locations, you must be a metastore admin or a user with the **CREATE_EXTERNAL_LOCATION** privilege.
Constructor and Description |
---|
ExternalLocationsAPI(ApiClient apiClient)
Regular-use constructor
|
ExternalLocationsAPI(ExternalLocationsService mock)
Constructor for mocks
|
Modifier and Type | Method and Description |
---|---|
ExternalLocationInfo |
create(CreateExternalLocation request)
Create an external location.
|
ExternalLocationInfo |
create(String name,
String url,
String credentialName) |
void |
delete(DeleteExternalLocationRequest request)
Delete an external location.
|
void |
delete(String name) |
ExternalLocationInfo |
get(GetExternalLocationRequest request)
Get an external location.
|
ExternalLocationInfo |
get(String name) |
ExternalLocationsService |
impl() |
Iterable<ExternalLocationInfo> |
list()
List external locations.
|
ExternalLocationInfo |
update(String name) |
ExternalLocationInfo |
update(UpdateExternalLocation request)
Update an external location.
|
public ExternalLocationsAPI(ApiClient apiClient)
public ExternalLocationsAPI(ExternalLocationsService mock)
public ExternalLocationInfo create(String name, String url, String credentialName)
public ExternalLocationInfo create(CreateExternalLocation request)
Creates a new external location entry in the metastore. The caller must be a metastore admin or have the **CREATE_EXTERNAL_LOCATION** privilege on both the metastore and the associated storage credential.
public void delete(String name)
public void delete(DeleteExternalLocationRequest request)
Deletes the specified external location from the metastore. The caller must be the owner of the external location.
public ExternalLocationInfo get(String name)
public ExternalLocationInfo get(GetExternalLocationRequest request)
Gets an external location from the metastore. The caller must be either a metastore admin, the owner of the external location, or a user that has some privilege on the external location.
public Iterable<ExternalLocationInfo> list()
Gets an array of external locations (__ExternalLocationInfo__ objects) from the metastore. The caller must be a metastore admin, the owner of the external location, or a user that has some privilege on the external location. There is no guarantee of a specific ordering of the elements in the array.
public ExternalLocationInfo update(String name)
public ExternalLocationInfo update(UpdateExternalLocation request)
Updates an external location in the metastore. The caller must be the owner of the external location, or be a metastore admin. In the second case, the admin can only update the name of the external location.
public ExternalLocationsService impl()
Copyright © 2023. All rights reserved.