@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
103 lines • 5.51 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.SqlTable = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Import
*
* This resource can be imported by its full name.
*
* bash
*
* ```sh
* $ pulumi import databricks:index/sqlTable:SqlTable this <catalog_name>.<schema_name>.<name>
* ```
*/
class SqlTable extends pulumi.CustomResource {
/**
* Get an existing SqlTable 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 SqlTable(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SqlTable. 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'] === SqlTable.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["catalogName"] = state ? state.catalogName : undefined;
resourceInputs["clusterId"] = state ? state.clusterId : undefined;
resourceInputs["clusterKeys"] = state ? state.clusterKeys : undefined;
resourceInputs["columns"] = state ? state.columns : undefined;
resourceInputs["comment"] = state ? state.comment : undefined;
resourceInputs["dataSourceFormat"] = state ? state.dataSourceFormat : undefined;
resourceInputs["effectiveProperties"] = state ? state.effectiveProperties : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["options"] = state ? state.options : undefined;
resourceInputs["owner"] = state ? state.owner : undefined;
resourceInputs["partitions"] = state ? state.partitions : 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;
resourceInputs["warehouseId"] = state ? state.warehouseId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.catalogName === undefined) && !opts.urn) {
throw new Error("Missing required property 'catalogName'");
}
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["clusterId"] = args ? args.clusterId : undefined;
resourceInputs["clusterKeys"] = args ? args.clusterKeys : 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["options"] = args ? args.options : undefined;
resourceInputs["owner"] = args ? args.owner : undefined;
resourceInputs["partitions"] = args ? args.partitions : 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;
resourceInputs["warehouseId"] = args ? args.warehouseId : undefined;
resourceInputs["effectiveProperties"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SqlTable.__pulumiType, name, resourceInputs, opts);
}
}
exports.SqlTable = SqlTable;
/** @internal */
SqlTable.__pulumiType = 'databricks:index/sqlTable:SqlTable';
//# sourceMappingURL=sqlTable.js.map
;