@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
101 lines (100 loc) • 4.51 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Retrieves information about metastore attached to a given workspace.
*
* > **Note** This is the workspace-level data source.
*
* > **Note** If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add dependsOn attribute to prevent _authentication is not configured for provider_ errors.
*
* ## Example Usage
*
* MetastoreSummary response for a metastore attached to the current workspace.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const _this = databricks.getCurrentMetastore({});
* export const someMetastore = _this.then(_this => _this.metastoreInfo);
* ```
*
* ## Related Resources
*
* The following resources are used in the same context:
*
* * databricks.Metastore to get information for a metastore with a given ID.
* * databricks.getMetastores to get a mapping of name to id of all metastores.
* * databricks.Metastore to manage Metastores within Unity Catalog.
* * databricks.Catalog to manage catalogs within Unity Catalog.
*/
export declare function getCurrentMetastore(args?: GetCurrentMetastoreArgs, opts?: pulumi.InvokeOptions): Promise<GetCurrentMetastoreResult>;
/**
* A collection of arguments for invoking getCurrentMetastore.
*/
export interface GetCurrentMetastoreArgs {
/**
* metastore ID. Will be `noMetastore` if there is no metastore assigned for the current workspace
*/
id?: string;
/**
* summary about a metastore attached to the current workspace returned by [Get a metastore summary API](https://docs.databricks.com/api/workspace/metastores/summary). This contains the following attributes (check the API page for up-to-date details):
*/
metastoreInfo?: inputs.GetCurrentMetastoreMetastoreInfo;
}
/**
* A collection of values returned by getCurrentMetastore.
*/
export interface GetCurrentMetastoreResult {
/**
* metastore ID. Will be `noMetastore` if there is no metastore assigned for the current workspace
*/
readonly id: string;
/**
* summary about a metastore attached to the current workspace returned by [Get a metastore summary API](https://docs.databricks.com/api/workspace/metastores/summary). This contains the following attributes (check the API page for up-to-date details):
*/
readonly metastoreInfo: outputs.GetCurrentMetastoreMetastoreInfo;
}
/**
* Retrieves information about metastore attached to a given workspace.
*
* > **Note** This is the workspace-level data source.
*
* > **Note** If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add dependsOn attribute to prevent _authentication is not configured for provider_ errors.
*
* ## Example Usage
*
* MetastoreSummary response for a metastore attached to the current workspace.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const _this = databricks.getCurrentMetastore({});
* export const someMetastore = _this.then(_this => _this.metastoreInfo);
* ```
*
* ## Related Resources
*
* The following resources are used in the same context:
*
* * databricks.Metastore to get information for a metastore with a given ID.
* * databricks.getMetastores to get a mapping of name to id of all metastores.
* * databricks.Metastore to manage Metastores within Unity Catalog.
* * databricks.Catalog to manage catalogs within Unity Catalog.
*/
export declare function getCurrentMetastoreOutput(args?: GetCurrentMetastoreOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetCurrentMetastoreResult>;
/**
* A collection of arguments for invoking getCurrentMetastore.
*/
export interface GetCurrentMetastoreOutputArgs {
/**
* metastore ID. Will be `noMetastore` if there is no metastore assigned for the current workspace
*/
id?: pulumi.Input<string>;
/**
* summary about a metastore attached to the current workspace returned by [Get a metastore summary API](https://docs.databricks.com/api/workspace/metastores/summary). This contains the following attributes (check the API page for up-to-date details):
*/
metastoreInfo?: pulumi.Input<inputs.GetCurrentMetastoreMetastoreInfoArgs>;
}