UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

84 lines 3.06 kB
"use strict"; // *** 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.getJobOutput = exports.getJob = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Retrieves the settings of databricks.Job by name or by id. Complements the feature of the databricks.getJobs data source. * * > This data source can only be used with a workspace-level provider! * * ## Example Usage * * Getting the existing cluster id of specific databricks.Job by name or by id: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = databricks.getJob({ * jobName: "My job", * }); * export const jobNumWorkers = _this.then(_this => _this.jobSettings?.settings?.newCluster?.numWorkers); * ``` * * ## Related Resources * * The following resources are used in the same context: * * * databricks.getJobs data to get all jobs and their names from a workspace. * * databricks.Job to manage [Databricks Jobs](https://docs.databricks.com/jobs.html) to run non-interactive code in a databricks_cluster. */ function getJob(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("databricks:index/getJob:getJob", { "id": args.id, "jobId": args.jobId, "jobName": args.jobName, "jobSettings": args.jobSettings, "name": args.name, }, opts); } exports.getJob = getJob; /** * Retrieves the settings of databricks.Job by name or by id. Complements the feature of the databricks.getJobs data source. * * > This data source can only be used with a workspace-level provider! * * ## Example Usage * * Getting the existing cluster id of specific databricks.Job by name or by id: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = databricks.getJob({ * jobName: "My job", * }); * export const jobNumWorkers = _this.then(_this => _this.jobSettings?.settings?.newCluster?.numWorkers); * ``` * * ## Related Resources * * The following resources are used in the same context: * * * databricks.getJobs data to get all jobs and their names from a workspace. * * databricks.Job to manage [Databricks Jobs](https://docs.databricks.com/jobs.html) to run non-interactive code in a databricks_cluster. */ function getJobOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("databricks:index/getJob:getJob", { "id": args.id, "jobId": args.jobId, "jobName": args.jobName, "jobSettings": args.jobSettings, "name": args.name, }, opts); } exports.getJobOutput = getJobOutput; //# sourceMappingURL=getJob.js.map