UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

72 lines 3.3 kB
"use strict"; // *** 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.GlobalInitScript = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * This resource allows you to manage [global init scripts](https://docs.databricks.com/clusters/init-scripts.html#global-init-scripts), which are run on all databricks.Cluster and databricks_job. * * ## Import * * The resource global init script can be imported using script ID: * * bash * * ```sh * $ pulumi import databricks:index/globalInitScript:GlobalInitScript this script_id * ``` */ class GlobalInitScript extends pulumi.CustomResource { /** * Get an existing GlobalInitScript 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 GlobalInitScript(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of GlobalInitScript. 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'] === GlobalInitScript.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["contentBase64"] = state ? state.contentBase64 : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["md5"] = state ? state.md5 : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["position"] = state ? state.position : undefined; resourceInputs["source"] = state ? state.source : undefined; } else { const args = argsOrState; resourceInputs["contentBase64"] = args ? args.contentBase64 : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["md5"] = args ? args.md5 : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["position"] = args ? args.position : undefined; resourceInputs["source"] = args ? args.source : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(GlobalInitScript.__pulumiType, name, resourceInputs, opts); } } exports.GlobalInitScript = GlobalInitScript; /** @internal */ GlobalInitScript.__pulumiType = 'databricks:index/globalInitScript:GlobalInitScript'; //# sourceMappingURL=globalInitScript.js.map