@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
113 lines • 5.35 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.Catalog = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* > This resource can only be used with a workspace-level provider!
*
* Within a metastore, Unity Catalog provides a 3-level namespace for organizing data: Catalogs, Databases (also called Schemas), and Tables / Views.
*
* A `databricks.Catalog` is contained within databricks.Metastore and can contain databricks_schema. By default, Databricks creates `default` schema for every new catalog, but Pulumi plugin is removing this auto-created schema, so that resource destruction could be done in a clean way.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const sandbox = new databricks.Catalog("sandbox", {
* name: "sandbox",
* comment: "this catalog is managed by terraform",
* properties: {
* purpose: "testing",
* },
* });
* ```
*
* ## Related Resources
*
* The following resources are used in the same context:
*
* * databricks.getTables data to list tables within Unity Catalog.
* * databricks.getSchemas data to list schemas within Unity Catalog.
* * databricks.getCatalogs data to list catalogs within Unity Catalog.
*
* ## Import
*
* This resource can be imported by name:
*
* bash
*
* ```sh
* $ pulumi import databricks:index/catalog:Catalog this <name>
* ```
*/
class Catalog extends pulumi.CustomResource {
/**
* Get an existing Catalog resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new Catalog(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Catalog. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Catalog.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["comment"] = state ? state.comment : undefined;
resourceInputs["connectionName"] = state ? state.connectionName : undefined;
resourceInputs["enablePredictiveOptimization"] = state ? state.enablePredictiveOptimization : undefined;
resourceInputs["forceDestroy"] = state ? state.forceDestroy : undefined;
resourceInputs["isolationMode"] = state ? state.isolationMode : undefined;
resourceInputs["metastoreId"] = state ? state.metastoreId : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["options"] = state ? state.options : undefined;
resourceInputs["owner"] = state ? state.owner : undefined;
resourceInputs["properties"] = state ? state.properties : undefined;
resourceInputs["providerName"] = state ? state.providerName : undefined;
resourceInputs["shareName"] = state ? state.shareName : undefined;
resourceInputs["storageRoot"] = state ? state.storageRoot : undefined;
}
else {
const args = argsOrState;
resourceInputs["comment"] = args ? args.comment : undefined;
resourceInputs["connectionName"] = args ? args.connectionName : undefined;
resourceInputs["enablePredictiveOptimization"] = args ? args.enablePredictiveOptimization : undefined;
resourceInputs["forceDestroy"] = args ? args.forceDestroy : undefined;
resourceInputs["isolationMode"] = args ? args.isolationMode : undefined;
resourceInputs["metastoreId"] = args ? args.metastoreId : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["options"] = args ? args.options : undefined;
resourceInputs["owner"] = args ? args.owner : undefined;
resourceInputs["properties"] = args ? args.properties : undefined;
resourceInputs["providerName"] = args ? args.providerName : undefined;
resourceInputs["shareName"] = args ? args.shareName : undefined;
resourceInputs["storageRoot"] = args ? args.storageRoot : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Catalog.__pulumiType, name, resourceInputs, opts);
}
}
exports.Catalog = Catalog;
/** @internal */
Catalog.__pulumiType = 'databricks:index/catalog:Catalog';
//# sourceMappingURL=catalog.js.map
;