UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

99 lines 4.64 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.MetastoreProvider = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * > This resource can only be used with a workspace-level provider! * * In Delta Sharing, a provider is an entity that shares data with a recipient. Within a metastore, Unity Catalog provides the ability to create a provider which contains a list of shares that have been shared with you. * * A `databricks.MetastoreProvider` is contained within databricks.Metastore and can contain a list of shares that have been shared with you. * * > Databricks to Databricks sharing automatically creates the provider. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const dbprovider = new databricks.MetastoreProvider("dbprovider", { * name: "terraform-test-provider", * comment: "made by terraform 2", * authenticationType: "TOKEN", * recipientProfileStr: JSON.stringify({ * shareCredentialsVersion: 1, * bearerToken: "token", * endpoint: "endpoint", * expirationTime: "expiration-time", * }), * }); * ``` * * ## 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. */ class MetastoreProvider extends pulumi.CustomResource { /** * Get an existing MetastoreProvider 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 MetastoreProvider(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MetastoreProvider. 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'] === MetastoreProvider.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authenticationType"] = state ? state.authenticationType : undefined; resourceInputs["comment"] = state ? state.comment : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["recipientProfileStr"] = state ? state.recipientProfileStr : undefined; } else { const args = argsOrState; if ((!args || args.authenticationType === undefined) && !opts.urn) { throw new Error("Missing required property 'authenticationType'"); } if ((!args || args.recipientProfileStr === undefined) && !opts.urn) { throw new Error("Missing required property 'recipientProfileStr'"); } resourceInputs["authenticationType"] = args ? args.authenticationType : undefined; resourceInputs["comment"] = args ? args.comment : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["recipientProfileStr"] = (args === null || args === void 0 ? void 0 : args.recipientProfileStr) ? pulumi.secret(args.recipientProfileStr) : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["recipientProfileStr"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(MetastoreProvider.__pulumiType, name, resourceInputs, opts); } } exports.MetastoreProvider = MetastoreProvider; /** @internal */ MetastoreProvider.__pulumiType = 'databricks:index/metastoreProvider:MetastoreProvider'; //# sourceMappingURL=metastoreProvider.js.map