@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
139 lines • 8.81 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.Cluster = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Import
*
* The resource cluster can be imported using cluster id.
*
* bash
*
* ```sh
* $ pulumi import databricks:index/cluster:Cluster this <cluster-id>
* ```
*/
class Cluster extends pulumi.CustomResource {
/**
* Get an existing Cluster 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 Cluster(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Cluster. 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'] === Cluster.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["applyPolicyDefaultValues"] = state ? state.applyPolicyDefaultValues : undefined;
resourceInputs["autoscale"] = state ? state.autoscale : undefined;
resourceInputs["autoterminationMinutes"] = state ? state.autoterminationMinutes : undefined;
resourceInputs["awsAttributes"] = state ? state.awsAttributes : undefined;
resourceInputs["azureAttributes"] = state ? state.azureAttributes : undefined;
resourceInputs["clusterId"] = state ? state.clusterId : undefined;
resourceInputs["clusterLogConf"] = state ? state.clusterLogConf : undefined;
resourceInputs["clusterMountInfos"] = state ? state.clusterMountInfos : undefined;
resourceInputs["clusterName"] = state ? state.clusterName : undefined;
resourceInputs["customTags"] = state ? state.customTags : undefined;
resourceInputs["dataSecurityMode"] = state ? state.dataSecurityMode : undefined;
resourceInputs["defaultTags"] = state ? state.defaultTags : undefined;
resourceInputs["dockerImage"] = state ? state.dockerImage : undefined;
resourceInputs["driverInstancePoolId"] = state ? state.driverInstancePoolId : undefined;
resourceInputs["driverNodeTypeId"] = state ? state.driverNodeTypeId : undefined;
resourceInputs["enableElasticDisk"] = state ? state.enableElasticDisk : undefined;
resourceInputs["enableLocalDiskEncryption"] = state ? state.enableLocalDiskEncryption : undefined;
resourceInputs["gcpAttributes"] = state ? state.gcpAttributes : undefined;
resourceInputs["idempotencyToken"] = state ? state.idempotencyToken : undefined;
resourceInputs["initScripts"] = state ? state.initScripts : undefined;
resourceInputs["instancePoolId"] = state ? state.instancePoolId : undefined;
resourceInputs["isPinned"] = state ? state.isPinned : undefined;
resourceInputs["isSingleNode"] = state ? state.isSingleNode : undefined;
resourceInputs["kind"] = state ? state.kind : undefined;
resourceInputs["libraries"] = state ? state.libraries : undefined;
resourceInputs["noWait"] = state ? state.noWait : undefined;
resourceInputs["nodeTypeId"] = state ? state.nodeTypeId : undefined;
resourceInputs["numWorkers"] = state ? state.numWorkers : undefined;
resourceInputs["policyId"] = state ? state.policyId : undefined;
resourceInputs["runtimeEngine"] = state ? state.runtimeEngine : undefined;
resourceInputs["singleUserName"] = state ? state.singleUserName : undefined;
resourceInputs["sparkConf"] = state ? state.sparkConf : undefined;
resourceInputs["sparkEnvVars"] = state ? state.sparkEnvVars : undefined;
resourceInputs["sparkVersion"] = state ? state.sparkVersion : undefined;
resourceInputs["sshPublicKeys"] = state ? state.sshPublicKeys : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["url"] = state ? state.url : undefined;
resourceInputs["useMlRuntime"] = state ? state.useMlRuntime : undefined;
resourceInputs["workloadType"] = state ? state.workloadType : undefined;
}
else {
const args = argsOrState;
if ((!args || args.sparkVersion === undefined) && !opts.urn) {
throw new Error("Missing required property 'sparkVersion'");
}
resourceInputs["applyPolicyDefaultValues"] = args ? args.applyPolicyDefaultValues : undefined;
resourceInputs["autoscale"] = args ? args.autoscale : undefined;
resourceInputs["autoterminationMinutes"] = args ? args.autoterminationMinutes : undefined;
resourceInputs["awsAttributes"] = args ? args.awsAttributes : undefined;
resourceInputs["azureAttributes"] = args ? args.azureAttributes : undefined;
resourceInputs["clusterLogConf"] = args ? args.clusterLogConf : undefined;
resourceInputs["clusterMountInfos"] = args ? args.clusterMountInfos : undefined;
resourceInputs["clusterName"] = args ? args.clusterName : undefined;
resourceInputs["customTags"] = args ? args.customTags : undefined;
resourceInputs["dataSecurityMode"] = args ? args.dataSecurityMode : undefined;
resourceInputs["dockerImage"] = args ? args.dockerImage : undefined;
resourceInputs["driverInstancePoolId"] = args ? args.driverInstancePoolId : undefined;
resourceInputs["driverNodeTypeId"] = args ? args.driverNodeTypeId : undefined;
resourceInputs["enableElasticDisk"] = args ? args.enableElasticDisk : undefined;
resourceInputs["enableLocalDiskEncryption"] = args ? args.enableLocalDiskEncryption : undefined;
resourceInputs["gcpAttributes"] = args ? args.gcpAttributes : undefined;
resourceInputs["idempotencyToken"] = args ? args.idempotencyToken : undefined;
resourceInputs["initScripts"] = args ? args.initScripts : undefined;
resourceInputs["instancePoolId"] = args ? args.instancePoolId : undefined;
resourceInputs["isPinned"] = args ? args.isPinned : undefined;
resourceInputs["isSingleNode"] = args ? args.isSingleNode : undefined;
resourceInputs["kind"] = args ? args.kind : undefined;
resourceInputs["libraries"] = args ? args.libraries : undefined;
resourceInputs["noWait"] = args ? args.noWait : undefined;
resourceInputs["nodeTypeId"] = args ? args.nodeTypeId : undefined;
resourceInputs["numWorkers"] = args ? args.numWorkers : undefined;
resourceInputs["policyId"] = args ? args.policyId : undefined;
resourceInputs["runtimeEngine"] = args ? args.runtimeEngine : undefined;
resourceInputs["singleUserName"] = args ? args.singleUserName : undefined;
resourceInputs["sparkConf"] = args ? args.sparkConf : undefined;
resourceInputs["sparkEnvVars"] = args ? args.sparkEnvVars : undefined;
resourceInputs["sparkVersion"] = args ? args.sparkVersion : undefined;
resourceInputs["sshPublicKeys"] = args ? args.sshPublicKeys : undefined;
resourceInputs["useMlRuntime"] = args ? args.useMlRuntime : undefined;
resourceInputs["workloadType"] = args ? args.workloadType : undefined;
resourceInputs["clusterId"] = undefined /*out*/;
resourceInputs["defaultTags"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["url"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Cluster.__pulumiType, name, resourceInputs, opts);
}
}
exports.Cluster = Cluster;
/** @internal */
Cluster.__pulumiType = 'databricks:index/cluster:Cluster';
//# sourceMappingURL=cluster.js.map
;