UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

86 lines 4.09 kB
"use strict"; // *** 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.Table = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); class Table extends pulumi.CustomResource { /** * Get an existing Table 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 Table(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Table. 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'] === Table.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["catalogName"] = state?.catalogName; resourceInputs["columns"] = state?.columns; resourceInputs["comment"] = state?.comment; resourceInputs["dataSourceFormat"] = state?.dataSourceFormat; resourceInputs["name"] = state?.name; resourceInputs["owner"] = state?.owner; resourceInputs["properties"] = state?.properties; resourceInputs["schemaName"] = state?.schemaName; resourceInputs["storageCredentialName"] = state?.storageCredentialName; resourceInputs["storageLocation"] = state?.storageLocation; resourceInputs["tableType"] = state?.tableType; resourceInputs["viewDefinition"] = state?.viewDefinition; } else { const args = argsOrState; if (args?.catalogName === undefined && !opts.urn) { throw new Error("Missing required property 'catalogName'"); } if (args?.columns === undefined && !opts.urn) { throw new Error("Missing required property 'columns'"); } if (args?.dataSourceFormat === undefined && !opts.urn) { throw new Error("Missing required property 'dataSourceFormat'"); } if (args?.schemaName === undefined && !opts.urn) { throw new Error("Missing required property 'schemaName'"); } if (args?.tableType === undefined && !opts.urn) { throw new Error("Missing required property 'tableType'"); } resourceInputs["catalogName"] = args?.catalogName; resourceInputs["columns"] = args?.columns; resourceInputs["comment"] = args?.comment; resourceInputs["dataSourceFormat"] = args?.dataSourceFormat; resourceInputs["name"] = args?.name; resourceInputs["owner"] = args?.owner; resourceInputs["properties"] = args?.properties; resourceInputs["schemaName"] = args?.schemaName; resourceInputs["storageCredentialName"] = args?.storageCredentialName; resourceInputs["storageLocation"] = args?.storageLocation; resourceInputs["tableType"] = args?.tableType; resourceInputs["viewDefinition"] = args?.viewDefinition; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Table.__pulumiType, name, resourceInputs, opts); } } exports.Table = Table; /** @internal */ Table.__pulumiType = 'databricks:index/table:Table'; //# sourceMappingURL=table.js.map