@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
99 lines • 4.4 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** 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");
/**
* 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.
*
* > This resource can only be used with a workspace-level provider!
*
* 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, { ...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?.authenticationType;
resourceInputs["comment"] = state?.comment;
resourceInputs["name"] = state?.name;
resourceInputs["recipientProfileStr"] = state?.recipientProfileStr;
}
else {
const args = argsOrState;
if (args?.authenticationType === undefined && !opts.urn) {
throw new Error("Missing required property 'authenticationType'");
}
if (args?.recipientProfileStr === undefined && !opts.urn) {
throw new Error("Missing required property 'recipientProfileStr'");
}
resourceInputs["authenticationType"] = args?.authenticationType;
resourceInputs["comment"] = args?.comment;
resourceInputs["name"] = args?.name;
resourceInputs["recipientProfileStr"] = 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