@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
84 lines • 3.46 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.getJobOutput = exports.getJob = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* > **Note** If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add dependsOn attribute in order to prevent _default auth: cannot configure default credentials_ errors.
*
* Retrieves the settings of databricks.Job by name or by id. Complements the feature of the databricks.getJobs data source.
*
* ## 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;
/**
* > **Note** If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add dependsOn attribute in order to prevent _default auth: cannot configure default credentials_ errors.
*
* Retrieves the settings of databricks.Job by name or by id. Complements the feature of the databricks.getJobs data source.
*
* ## 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
;