@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
86 lines • 4.64 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.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, Object.assign(Object.assign({}, 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 ? state.catalogName : undefined;
resourceInputs["columns"] = state ? state.columns : undefined;
resourceInputs["comment"] = state ? state.comment : undefined;
resourceInputs["dataSourceFormat"] = state ? state.dataSourceFormat : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["owner"] = state ? state.owner : undefined;
resourceInputs["properties"] = state ? state.properties : undefined;
resourceInputs["schemaName"] = state ? state.schemaName : undefined;
resourceInputs["storageCredentialName"] = state ? state.storageCredentialName : undefined;
resourceInputs["storageLocation"] = state ? state.storageLocation : undefined;
resourceInputs["tableType"] = state ? state.tableType : undefined;
resourceInputs["viewDefinition"] = state ? state.viewDefinition : undefined;
}
else {
const args = argsOrState;
if ((!args || args.catalogName === undefined) && !opts.urn) {
throw new Error("Missing required property 'catalogName'");
}
if ((!args || args.columns === undefined) && !opts.urn) {
throw new Error("Missing required property 'columns'");
}
if ((!args || args.dataSourceFormat === undefined) && !opts.urn) {
throw new Error("Missing required property 'dataSourceFormat'");
}
if ((!args || args.schemaName === undefined) && !opts.urn) {
throw new Error("Missing required property 'schemaName'");
}
if ((!args || args.tableType === undefined) && !opts.urn) {
throw new Error("Missing required property 'tableType'");
}
resourceInputs["catalogName"] = args ? args.catalogName : undefined;
resourceInputs["columns"] = args ? args.columns : undefined;
resourceInputs["comment"] = args ? args.comment : undefined;
resourceInputs["dataSourceFormat"] = args ? args.dataSourceFormat : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["owner"] = args ? args.owner : undefined;
resourceInputs["properties"] = args ? args.properties : undefined;
resourceInputs["schemaName"] = args ? args.schemaName : undefined;
resourceInputs["storageCredentialName"] = args ? args.storageCredentialName : undefined;
resourceInputs["storageLocation"] = args ? args.storageLocation : undefined;
resourceInputs["tableType"] = args ? args.tableType : undefined;
resourceInputs["viewDefinition"] = args ? args.viewDefinition : undefined;
}
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
;