@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
99 lines • 5.03 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.Query = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Import
*
* This resource can be imported using query ID:
*
* bash
*
* ```sh
* $ pulumi import databricks:index/query:Query this <query-id>
* ```
*/
class Query extends pulumi.CustomResource {
/**
* Get an existing Query 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 Query(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Query. 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'] === Query.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["applyAutoLimit"] = state ? state.applyAutoLimit : undefined;
resourceInputs["catalog"] = state ? state.catalog : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["lastModifierUserName"] = state ? state.lastModifierUserName : undefined;
resourceInputs["lifecycleState"] = state ? state.lifecycleState : undefined;
resourceInputs["ownerUserName"] = state ? state.ownerUserName : undefined;
resourceInputs["parameters"] = state ? state.parameters : undefined;
resourceInputs["parentPath"] = state ? state.parentPath : undefined;
resourceInputs["queryText"] = state ? state.queryText : undefined;
resourceInputs["runAsMode"] = state ? state.runAsMode : undefined;
resourceInputs["schema"] = state ? state.schema : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["updateTime"] = state ? state.updateTime : undefined;
resourceInputs["warehouseId"] = state ? state.warehouseId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.displayName === undefined) && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
if ((!args || args.queryText === undefined) && !opts.urn) {
throw new Error("Missing required property 'queryText'");
}
if ((!args || args.warehouseId === undefined) && !opts.urn) {
throw new Error("Missing required property 'warehouseId'");
}
resourceInputs["applyAutoLimit"] = args ? args.applyAutoLimit : undefined;
resourceInputs["catalog"] = args ? args.catalog : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["ownerUserName"] = args ? args.ownerUserName : undefined;
resourceInputs["parameters"] = args ? args.parameters : undefined;
resourceInputs["parentPath"] = args ? args.parentPath : undefined;
resourceInputs["queryText"] = args ? args.queryText : undefined;
resourceInputs["runAsMode"] = args ? args.runAsMode : undefined;
resourceInputs["schema"] = args ? args.schema : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["warehouseId"] = args ? args.warehouseId : undefined;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["lastModifierUserName"] = undefined /*out*/;
resourceInputs["lifecycleState"] = undefined /*out*/;
resourceInputs["updateTime"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Query.__pulumiType, name, resourceInputs, opts);
}
}
exports.Query = Query;
/** @internal */
Query.__pulumiType = 'databricks:index/query:Query';
//# sourceMappingURL=query.js.map
;