UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

112 lines 4.5 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getMetastoreOutput = exports.getMetastore = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * > **Note** This data source can only be used with an account-level provider! * * Retrieves information about metastore for a given id of databricks.Metastore object, that was created by Pulumi or manually, so that special handling could be applied. * * > **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 in order to prevent _authentication is not configured for provider_ errors. * * ## Example Usage * * MetastoreInfo response for a given metastore id * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as databricks from "@pulumi/databricks"; * * const metastore = new aws.s3.BucketV2("metastore", { * bucket: `${prefix}-metastore`, * forceDestroy: true, * }); * const thisMetastore = new databricks.Metastore("this", { * name: "primary", * storageRoot: pulumi.interpolate`s3://${metastore.id}/metastore`, * owner: unityAdminGroup, * forceDestroy: true, * }); * const _this = databricks.getMetastoreOutput({ * metastoreId: thisMetastore.id, * }); * export const someMetastore = _this.apply(_this => _this.metastoreInfo); * ``` * * ## Related Resources * * The following resources are used in the same context: * * * databricks.getMetastores to get mapping of name to id of all metastores. * * databricks.Metastore to manage Metastores within Unity Catalog. * * databricks.Catalog to manage catalogs within Unity Catalog. */ function getMetastore(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("databricks:index/getMetastore:getMetastore", { "id": args.id, "metastoreId": args.metastoreId, "metastoreInfo": args.metastoreInfo, "name": args.name, "region": args.region, }, opts); } exports.getMetastore = getMetastore; /** * > **Note** This data source can only be used with an account-level provider! * * Retrieves information about metastore for a given id of databricks.Metastore object, that was created by Pulumi or manually, so that special handling could be applied. * * > **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 in order to prevent _authentication is not configured for provider_ errors. * * ## Example Usage * * MetastoreInfo response for a given metastore id * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as databricks from "@pulumi/databricks"; * * const metastore = new aws.s3.BucketV2("metastore", { * bucket: `${prefix}-metastore`, * forceDestroy: true, * }); * const thisMetastore = new databricks.Metastore("this", { * name: "primary", * storageRoot: pulumi.interpolate`s3://${metastore.id}/metastore`, * owner: unityAdminGroup, * forceDestroy: true, * }); * const _this = databricks.getMetastoreOutput({ * metastoreId: thisMetastore.id, * }); * export const someMetastore = _this.apply(_this => _this.metastoreInfo); * ``` * * ## Related Resources * * The following resources are used in the same context: * * * databricks.getMetastores to get mapping of name to id of all metastores. * * databricks.Metastore to manage Metastores within Unity Catalog. * * databricks.Catalog to manage catalogs within Unity Catalog. */ function getMetastoreOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("databricks:index/getMetastore:getMetastore", { "id": args.id, "metastoreId": args.metastoreId, "metastoreInfo": args.metastoreInfo, "name": args.name, "region": args.region, }, opts); } exports.getMetastoreOutput = getMetastoreOutput; //# sourceMappingURL=getMetastore.js.map