UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

115 lines 5.02 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.SqlTable = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Import * * This resource can be imported by its full name: * * hcl * * import { * * to = databricks_sql_table.this * * id = "<catalog_name>.<schema_name>.<name>" * * } * * Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command: * * 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, { ...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?.catalogName; resourceInputs["clusterId"] = state?.clusterId; resourceInputs["clusterKeys"] = state?.clusterKeys; resourceInputs["columns"] = state?.columns; resourceInputs["comment"] = state?.comment; resourceInputs["dataSourceFormat"] = state?.dataSourceFormat; resourceInputs["effectiveProperties"] = state?.effectiveProperties; resourceInputs["name"] = state?.name; resourceInputs["options"] = state?.options; resourceInputs["owner"] = state?.owner; resourceInputs["partitions"] = state?.partitions; resourceInputs["properties"] = state?.properties; resourceInputs["schemaName"] = state?.schemaName; resourceInputs["storageCredentialName"] = state?.storageCredentialName; resourceInputs["storageLocation"] = state?.storageLocation; resourceInputs["tableType"] = state?.tableType; resourceInputs["viewDefinition"] = state?.viewDefinition; resourceInputs["warehouseId"] = state?.warehouseId; } else { const args = argsOrState; if (args?.catalogName === undefined && !opts.urn) { throw new Error("Missing required property 'catalogName'"); } 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["clusterId"] = args?.clusterId; resourceInputs["clusterKeys"] = args?.clusterKeys; resourceInputs["columns"] = args?.columns; resourceInputs["comment"] = args?.comment; resourceInputs["dataSourceFormat"] = args?.dataSourceFormat; resourceInputs["name"] = args?.name; resourceInputs["options"] = args?.options; resourceInputs["owner"] = args?.owner; resourceInputs["partitions"] = args?.partitions; resourceInputs["properties"] = args?.properties; resourceInputs["schemaName"] = args?.schemaName; resourceInputs["storageCredentialName"] = args?.storageCredentialName; resourceInputs["storageLocation"] = args?.storageLocation; resourceInputs["tableType"] = args?.tableType; resourceInputs["viewDefinition"] = args?.viewDefinition; resourceInputs["warehouseId"] = args?.warehouseId; 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