Class ExternalLocationsAPI
- java.lang.Object
-
- com.databricks.sdk.service.catalog.ExternalLocationsAPI
-
@Generated public class ExternalLocationsAPI extends Object
An external location is an object that combines a cloud storage path with a storage credential that authorizes access to the cloud storage path. Each external location is subject to Unity Catalog access-control policies that control which users and groups can access the credential. If a user does not have access to an external location in Unity Catalog, the request fails and Unity Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf.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 Summary
Constructors Constructor Description ExternalLocationsAPI(ApiClient apiClient)Regular-use constructorExternalLocationsAPI(ExternalLocationsService mock)Constructor for mocks
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExternalLocationInfocreate(CreateExternalLocation request)Create an external location.ExternalLocationInfocreate(String name, String url, String credentialName)voiddelete(DeleteExternalLocationRequest request)Delete an external location.voiddelete(String name)ExternalLocationInfoget(GetExternalLocationRequest request)Get an external location.ExternalLocationInfoget(String name)ExternalLocationsServiceimpl()Iterable<ExternalLocationInfo>list()List external locations.ExternalLocationInfoupdate(UpdateExternalLocation request)Update an external location.ExternalLocationInfoupdate(String name)
-
-
-
Constructor Detail
-
ExternalLocationsAPI
public ExternalLocationsAPI(ApiClient apiClient)
Regular-use constructor
-
ExternalLocationsAPI
public ExternalLocationsAPI(ExternalLocationsService mock)
Constructor for mocks
-
-
Method Detail
-
create
public ExternalLocationInfo create(String name, String url, String credentialName)
-
create
public ExternalLocationInfo create(CreateExternalLocation request)
Create an external location.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.
-
delete
public void delete(String name)
-
delete
public void delete(DeleteExternalLocationRequest request)
Delete an external location.Deletes the specified external location from the metastore. The caller must be the owner of the external location.
-
get
public ExternalLocationInfo get(String name)
-
get
public ExternalLocationInfo get(GetExternalLocationRequest request)
Get an external location.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.
-
list
public Iterable<ExternalLocationInfo> list()
List external locations.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.
-
update
public ExternalLocationInfo update(String name)
-
update
public ExternalLocationInfo update(UpdateExternalLocation request)
Update an external location.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.
-
impl
public ExternalLocationsService impl()
-
-