@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
94 lines • 3.59 kB
JavaScript
// *** 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.getCatalogOutput = exports.getCatalog = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* > **Note** This data source can only be used with a workspace-level provider!
*
* > **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 _default auth: cannot configure default credentials_ errors.
*
* Retrieves details of a specific catalog in Unity Catalog, that were created by Pulumi or manually. Use databricks.getCatalogs to retrieve IDs of multiple catalogs from Unity Catalog
*
* ## Example Usage
*
* Read on a specific catalog `test`:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const test = databricks.getCatalog({
* name: "test",
* });
* const things = new databricks.Grants("things", {
* catalog: test.then(test => test.name),
* grants: [{
* principal: "sensitive",
* privileges: ["USE_CATALOG"],
* }],
* });
* ```
*
* ## Related Resources
*
* The following resources are used in the same context:
*
* * databricks.Grant to manage grants within Unity Catalog.
* * databricks.getCatalogs to list all catalogs within Unity Catalog metastore.
*/
function getCatalog(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("databricks:index/getCatalog:getCatalog", {
"catalogInfo": args.catalogInfo,
"id": args.id,
"name": args.name,
}, opts);
}
exports.getCatalog = getCatalog;
/**
* > **Note** This data source can only be used with a workspace-level provider!
*
* > **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 _default auth: cannot configure default credentials_ errors.
*
* Retrieves details of a specific catalog in Unity Catalog, that were created by Pulumi or manually. Use databricks.getCatalogs to retrieve IDs of multiple catalogs from Unity Catalog
*
* ## Example Usage
*
* Read on a specific catalog `test`:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const test = databricks.getCatalog({
* name: "test",
* });
* const things = new databricks.Grants("things", {
* catalog: test.then(test => test.name),
* grants: [{
* principal: "sensitive",
* privileges: ["USE_CATALOG"],
* }],
* });
* ```
*
* ## Related Resources
*
* The following resources are used in the same context:
*
* * databricks.Grant to manage grants within Unity Catalog.
* * databricks.getCatalogs to list all catalogs within Unity Catalog metastore.
*/
function getCatalogOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("databricks:index/getCatalog:getCatalog", {
"catalogInfo": args.catalogInfo,
"id": args.id,
"name": args.name,
}, opts);
}
exports.getCatalogOutput = getCatalogOutput;
//# sourceMappingURL=getCatalog.js.map
;