@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
199 lines • 9.99 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.Pipeline = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Use `databricks.Pipeline` to deploy [Delta Live Tables](https://docs.databricks.com/data-engineering/delta-live-tables/index.html).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const dltDemo = new databricks.Notebook("dlt_demo", {});
* const dltDemoRepo = new databricks.Repo("dlt_demo", {});
* const _this = new databricks.Pipeline("this", {
* name: "Pipeline Name",
* storage: "/test/first-pipeline",
* configuration: {
* key1: "value1",
* key2: "value2",
* },
* clusters: [
* {
* label: "default",
* numWorkers: 2,
* customTags: {
* cluster_type: "default",
* },
* },
* {
* label: "maintenance",
* numWorkers: 1,
* customTags: {
* cluster_type: "maintenance",
* },
* },
* ],
* libraries: [
* {
* notebook: {
* path: dltDemo.id,
* },
* },
* {
* file: {
* path: pulumi.interpolate`${dltDemoRepo.path}/pipeline.sql`,
* },
* },
* ],
* continuous: false,
* notifications: [{
* emailRecipients: [
* "user@domain.com",
* "user1@domain.com",
* ],
* alerts: [
* "on-update-failure",
* "on-update-fatal-failure",
* "on-update-success",
* "on-flow-failure",
* ],
* }],
* });
* ```
*
* ## Related Resources
*
* The following resources are often used in the same context:
*
* * End to end workspace management guide.
* * databricks.getPipelines to retrieve [Delta Live Tables](https://docs.databricks.com/data-engineering/delta-live-tables/index.html) pipeline data.
* * databricks.Cluster to create [Databricks Clusters](https://docs.databricks.com/clusters/index.html).
* * databricks.Job to manage [Databricks Jobs](https://docs.databricks.com/jobs.html) to run non-interactive code in a databricks_cluster.
* * databricks.Notebook to manage [Databricks Notebooks](https://docs.databricks.com/notebooks/index.html).
*
* ## Import
*
* The resource job can be imported using the id of the pipeline
*
* bash
*
* ```sh
* $ pulumi import databricks:index/pipeline:Pipeline this <pipeline-id>
* ```
*/
class Pipeline extends pulumi.CustomResource {
/**
* Get an existing Pipeline 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 Pipeline(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Pipeline. 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'] === Pipeline.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allowDuplicateNames"] = state ? state.allowDuplicateNames : undefined;
resourceInputs["budgetPolicyId"] = state ? state.budgetPolicyId : undefined;
resourceInputs["catalog"] = state ? state.catalog : undefined;
resourceInputs["cause"] = state ? state.cause : undefined;
resourceInputs["channel"] = state ? state.channel : undefined;
resourceInputs["clusterId"] = state ? state.clusterId : undefined;
resourceInputs["clusters"] = state ? state.clusters : undefined;
resourceInputs["configuration"] = state ? state.configuration : undefined;
resourceInputs["continuous"] = state ? state.continuous : undefined;
resourceInputs["creatorUserName"] = state ? state.creatorUserName : undefined;
resourceInputs["deployment"] = state ? state.deployment : undefined;
resourceInputs["development"] = state ? state.development : undefined;
resourceInputs["edition"] = state ? state.edition : undefined;
resourceInputs["eventLog"] = state ? state.eventLog : undefined;
resourceInputs["expectedLastModified"] = state ? state.expectedLastModified : undefined;
resourceInputs["filters"] = state ? state.filters : undefined;
resourceInputs["gatewayDefinition"] = state ? state.gatewayDefinition : undefined;
resourceInputs["health"] = state ? state.health : undefined;
resourceInputs["ingestionDefinition"] = state ? state.ingestionDefinition : undefined;
resourceInputs["lastModified"] = state ? state.lastModified : undefined;
resourceInputs["latestUpdates"] = state ? state.latestUpdates : undefined;
resourceInputs["libraries"] = state ? state.libraries : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["notifications"] = state ? state.notifications : undefined;
resourceInputs["photon"] = state ? state.photon : undefined;
resourceInputs["restartWindow"] = state ? state.restartWindow : undefined;
resourceInputs["runAs"] = state ? state.runAs : undefined;
resourceInputs["runAsUserName"] = state ? state.runAsUserName : undefined;
resourceInputs["schema"] = state ? state.schema : undefined;
resourceInputs["serverless"] = state ? state.serverless : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["storage"] = state ? state.storage : undefined;
resourceInputs["target"] = state ? state.target : undefined;
resourceInputs["trigger"] = state ? state.trigger : undefined;
resourceInputs["url"] = state ? state.url : undefined;
}
else {
const args = argsOrState;
resourceInputs["allowDuplicateNames"] = args ? args.allowDuplicateNames : undefined;
resourceInputs["budgetPolicyId"] = args ? args.budgetPolicyId : undefined;
resourceInputs["catalog"] = args ? args.catalog : undefined;
resourceInputs["cause"] = args ? args.cause : undefined;
resourceInputs["channel"] = args ? args.channel : undefined;
resourceInputs["clusterId"] = args ? args.clusterId : undefined;
resourceInputs["clusters"] = args ? args.clusters : undefined;
resourceInputs["configuration"] = args ? args.configuration : undefined;
resourceInputs["continuous"] = args ? args.continuous : undefined;
resourceInputs["creatorUserName"] = args ? args.creatorUserName : undefined;
resourceInputs["deployment"] = args ? args.deployment : undefined;
resourceInputs["development"] = args ? args.development : undefined;
resourceInputs["edition"] = args ? args.edition : undefined;
resourceInputs["eventLog"] = args ? args.eventLog : undefined;
resourceInputs["expectedLastModified"] = args ? args.expectedLastModified : undefined;
resourceInputs["filters"] = args ? args.filters : undefined;
resourceInputs["gatewayDefinition"] = args ? args.gatewayDefinition : undefined;
resourceInputs["health"] = args ? args.health : undefined;
resourceInputs["ingestionDefinition"] = args ? args.ingestionDefinition : undefined;
resourceInputs["lastModified"] = args ? args.lastModified : undefined;
resourceInputs["latestUpdates"] = args ? args.latestUpdates : undefined;
resourceInputs["libraries"] = args ? args.libraries : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["notifications"] = args ? args.notifications : undefined;
resourceInputs["photon"] = args ? args.photon : undefined;
resourceInputs["restartWindow"] = args ? args.restartWindow : undefined;
resourceInputs["runAs"] = args ? args.runAs : undefined;
resourceInputs["runAsUserName"] = args ? args.runAsUserName : undefined;
resourceInputs["schema"] = args ? args.schema : undefined;
resourceInputs["serverless"] = args ? args.serverless : undefined;
resourceInputs["state"] = args ? args.state : undefined;
resourceInputs["storage"] = args ? args.storage : undefined;
resourceInputs["target"] = args ? args.target : undefined;
resourceInputs["trigger"] = args ? args.trigger : undefined;
resourceInputs["url"] = args ? args.url : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Pipeline.__pulumiType, name, resourceInputs, opts);
}
}
exports.Pipeline = Pipeline;
/** @internal */
Pipeline.__pulumiType = 'databricks:index/pipeline:Pipeline';
//# sourceMappingURL=pipeline.js.map
;