@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
77 lines • 3.46 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.WorkspaceFile = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* This resource allows you to manage [Databricks Workspace Files](https://docs.databricks.com/files/workspace.html).
*
* ## Import
*
* The workspace file resource can be imported using workspace file path
*
* bash
*
* ```sh
* $ pulumi import databricks:index/workspaceFile:WorkspaceFile this /path/to/file
* ```
*/
class WorkspaceFile extends pulumi.CustomResource {
/**
* Get an existing WorkspaceFile 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 WorkspaceFile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of WorkspaceFile. 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'] === WorkspaceFile.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["contentBase64"] = state ? state.contentBase64 : undefined;
resourceInputs["md5"] = state ? state.md5 : undefined;
resourceInputs["objectId"] = state ? state.objectId : undefined;
resourceInputs["path"] = state ? state.path : undefined;
resourceInputs["source"] = state ? state.source : undefined;
resourceInputs["url"] = state ? state.url : undefined;
resourceInputs["workspacePath"] = state ? state.workspacePath : undefined;
}
else {
const args = argsOrState;
if ((!args || args.path === undefined) && !opts.urn) {
throw new Error("Missing required property 'path'");
}
resourceInputs["contentBase64"] = args ? args.contentBase64 : undefined;
resourceInputs["md5"] = args ? args.md5 : undefined;
resourceInputs["objectId"] = args ? args.objectId : undefined;
resourceInputs["path"] = args ? args.path : undefined;
resourceInputs["source"] = args ? args.source : undefined;
resourceInputs["url"] = undefined /*out*/;
resourceInputs["workspacePath"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(WorkspaceFile.__pulumiType, name, resourceInputs, opts);
}
}
exports.WorkspaceFile = WorkspaceFile;
/** @internal */
WorkspaceFile.__pulumiType = 'databricks:index/workspaceFile:WorkspaceFile';
//# sourceMappingURL=workspaceFile.js.map
;