UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

123 lines 6.37 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.Metastore = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * > This resource can be used with an account or workspace-level provider. * * A metastore is the top-level container of objects in Unity Catalog. It stores data assets (tables and views) and the permissions that govern access to them. Databricks account admins can create metastores and assign them to Databricks workspaces in order to control which workloads use each metastore. * * Unity Catalog offers a new metastore with built in security and auditing. This is distinct to the metastore used in previous versions of Databricks (based on the Hive Metastore). * * A Unity Catalog metastore can be created without a root location & credential to maintain strict separation of storage across catalogs or environments. * * ## Example Usage * * For AWS * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = new databricks.Metastore("this", { * name: "primary", * storageRoot: `s3://${metastore.id}/metastore`, * owner: "uc admins", * region: "us-east-1", * forceDestroy: true, * }); * const thisMetastoreAssignment = new databricks.MetastoreAssignment("this", { * metastoreId: _this.id, * workspaceId: workspaceId, * }); * ``` * * For Azure * * ## Import * * This resource can be imported by ID: * * bash * * ```sh * $ pulumi import databricks:index/metastore:Metastore this <id> * ``` */ class Metastore extends pulumi.CustomResource { /** * Get an existing Metastore 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 Metastore(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Metastore. 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'] === Metastore.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["cloud"] = state ? state.cloud : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["createdBy"] = state ? state.createdBy : undefined; resourceInputs["defaultDataAccessConfigId"] = state ? state.defaultDataAccessConfigId : undefined; resourceInputs["deltaSharingOrganizationName"] = state ? state.deltaSharingOrganizationName : undefined; resourceInputs["deltaSharingRecipientTokenLifetimeInSeconds"] = state ? state.deltaSharingRecipientTokenLifetimeInSeconds : undefined; resourceInputs["deltaSharingScope"] = state ? state.deltaSharingScope : undefined; resourceInputs["forceDestroy"] = state ? state.forceDestroy : undefined; resourceInputs["globalMetastoreId"] = state ? state.globalMetastoreId : undefined; resourceInputs["metastoreId"] = state ? state.metastoreId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["owner"] = state ? state.owner : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["storageRoot"] = state ? state.storageRoot : undefined; resourceInputs["storageRootCredentialId"] = state ? state.storageRootCredentialId : undefined; resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; resourceInputs["updatedBy"] = state ? state.updatedBy : undefined; } else { const args = argsOrState; resourceInputs["cloud"] = args ? args.cloud : undefined; resourceInputs["createdAt"] = args ? args.createdAt : undefined; resourceInputs["createdBy"] = args ? args.createdBy : undefined; resourceInputs["defaultDataAccessConfigId"] = args ? args.defaultDataAccessConfigId : undefined; resourceInputs["deltaSharingOrganizationName"] = args ? args.deltaSharingOrganizationName : undefined; resourceInputs["deltaSharingRecipientTokenLifetimeInSeconds"] = args ? args.deltaSharingRecipientTokenLifetimeInSeconds : undefined; resourceInputs["deltaSharingScope"] = args ? args.deltaSharingScope : undefined; resourceInputs["forceDestroy"] = args ? args.forceDestroy : undefined; resourceInputs["globalMetastoreId"] = args ? args.globalMetastoreId : undefined; resourceInputs["metastoreId"] = args ? args.metastoreId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["owner"] = args ? args.owner : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["storageRoot"] = args ? args.storageRoot : undefined; resourceInputs["storageRootCredentialId"] = args ? args.storageRootCredentialId : undefined; resourceInputs["updatedAt"] = args ? args.updatedAt : undefined; resourceInputs["updatedBy"] = args ? args.updatedBy : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Metastore.__pulumiType, name, resourceInputs, opts); } } exports.Metastore = Metastore; /** @internal */ Metastore.__pulumiType = 'databricks:index/metastore:Metastore'; //# sourceMappingURL=metastore.js.map