@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
86 lines • 3.32 kB
JavaScript
;
// *** 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.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.
*
* > This resource can only be used with a workspace-level provider!
*
* ## Import
*
* The resource global init script can be imported using script ID:
*
* hcl
*
* import {
*
* to = databricks_global_init_script.this
*
* id = "script_id"
*
* }
*
* Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command:
*
* 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, { ...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?.contentBase64;
resourceInputs["enabled"] = state?.enabled;
resourceInputs["md5"] = state?.md5;
resourceInputs["name"] = state?.name;
resourceInputs["position"] = state?.position;
resourceInputs["source"] = state?.source;
}
else {
const args = argsOrState;
resourceInputs["contentBase64"] = args?.contentBase64;
resourceInputs["enabled"] = args?.enabled;
resourceInputs["md5"] = args?.md5;
resourceInputs["name"] = args?.name;
resourceInputs["position"] = args?.position;
resourceInputs["source"] = args?.source;
}
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