@Generated public class MetastoresAPI extends Object
Each metastore is configured with a root storage location in a cloud storage account. This storage location is used for metadata and managed tables data.
NOTE: This metastore is distinct from the metastore included in Databricks workspaces created before Unity Catalog was released. If your workspace includes a legacy Hive metastore, the data in that metastore is available in a catalog named hive_metastore.
| Constructor and Description |
|---|
MetastoresAPI(ApiClient apiClient)
Regular-use constructor
|
MetastoresAPI(MetastoresService mock)
Constructor for mocks
|
| Modifier and Type | Method and Description |
|---|---|
void |
assign(CreateMetastoreAssignment request)
Creates a new metastore assignment.
|
MetastoreInfo |
create(CreateMetastore request)
Creates a new metastore based on a provided name and optional storage root path.
|
MetastoreAssignment |
current()
Gets the metastore assignment for the workspace being accessed.
|
void |
delete(DeleteMetastoreRequest request)
Deletes a metastore.
|
void |
delete(String id) |
MetastoreInfo |
get(GetMetastoreRequest request)
Gets a metastore that matches the supplied ID.
|
MetastoreInfo |
get(String id) |
MetastoresService |
impl() |
Iterable<MetastoreInfo> |
list(ListMetastoresRequest request)
Gets an array of the available metastores (as __MetastoreInfo__ objects).
|
GetMetastoreSummaryResponse |
summary()
Gets information about a metastore.
|
void |
unassign(long workspaceId) |
void |
unassign(UnassignRequest request)
Deletes a metastore assignment.
|
MetastoreInfo |
update(UpdateMetastore request)
Updates information for a specific metastore.
|
void |
updateAssignment(UpdateMetastoreAssignment request)
Updates a metastore assignment.
|
public MetastoresAPI(ApiClient apiClient)
public MetastoresAPI(MetastoresService mock)
public void assign(CreateMetastoreAssignment request)
public MetastoreInfo create(CreateMetastore request)
public MetastoreAssignment current()
public void delete(String id)
public void delete(DeleteMetastoreRequest request)
public MetastoreInfo get(String id)
public MetastoreInfo get(GetMetastoreRequest request)
public Iterable<MetastoreInfo> list(ListMetastoresRequest 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 GetMetastoreSummaryResponse summary()
public void unassign(long workspaceId)
public void unassign(UnassignRequest request)
public MetastoreInfo update(UpdateMetastore request)
public void updateAssignment(UpdateMetastoreAssignment request)
public MetastoresService impl()
Copyright © 2026. All rights reserved.