All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.databricks.sdk.service.catalog.AccountMetastoresAPI Maven / Gradle / Ivy

There is a newer version: 0.38.0
Show newest version
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package com.databricks.sdk.service.catalog;

import com.databricks.sdk.core.ApiClient;
import com.databricks.sdk.support.Generated;
import com.databricks.sdk.support.Paginator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * These APIs manage Unity Catalog metastores for an account. A metastore contains catalogs that can
 * be associated with workspaces
 */
@Generated
public class AccountMetastoresAPI {
  private static final Logger LOG = LoggerFactory.getLogger(AccountMetastoresAPI.class);

  private final AccountMetastoresService impl;

  /** Regular-use constructor */
  public AccountMetastoresAPI(ApiClient apiClient) {
    impl = new AccountMetastoresImpl(apiClient);
  }

  /** Constructor for mocks */
  public AccountMetastoresAPI(AccountMetastoresService mock) {
    impl = mock;
  }

  /**
   * Create metastore.
   *
   * 

Creates a Unity Catalog metastore. */ public AccountsMetastoreInfo create(AccountsCreateMetastore request) { return impl.create(request); } public void delete(String metastoreId) { delete(new DeleteAccountMetastoreRequest().setMetastoreId(metastoreId)); } /** * Delete a metastore. * *

Deletes a Unity Catalog metastore for an account, both specified by ID. */ public void delete(DeleteAccountMetastoreRequest request) { impl.delete(request); } public AccountsMetastoreInfo get(String metastoreId) { return get(new GetAccountMetastoreRequest().setMetastoreId(metastoreId)); } /** * Get a metastore. * *

Gets a Unity Catalog metastore from an account, both specified by ID. */ public AccountsMetastoreInfo get(GetAccountMetastoreRequest request) { return impl.get(request); } /** * Get all metastores associated with an account. * *

Gets all Unity Catalog metastores associated with an account specified by ID. */ public Iterable list() { return new Paginator<>( null, (Void v) -> impl.list(), ListMetastoresResponse::getMetastores, response -> null); } public AccountsMetastoreInfo update(String metastoreId) { return update(new AccountsUpdateMetastore().setMetastoreId(metastoreId)); } /** * Update a metastore. * *

Updates an existing Unity Catalog metastore. */ public AccountsMetastoreInfo update(AccountsUpdateMetastore request) { return impl.update(request); } public AccountMetastoresService impl() { return impl; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy