@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
104 lines • 4.97 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.MlflowExperiment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* This resource allows you to manage [MLflow experiments](https://docs.databricks.com/data/data-sources/mlflow-experiment.html) in Databricks.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const me = databricks.getCurrentUser({});
* const _this = new databricks.MlflowExperiment("this", {
* name: me.then(me => `${me.home}/Sample`),
* artifactLocation: "dbfs:/tmp/my-experiment",
* description: "My MLflow experiment description",
* });
* ```
*
* ## Access Control
*
* * databricks.Permissions can control which groups or individual users can *Read*, *Edit*, or *Manage* individual experiments.
*
* ## Related Resources
*
* The following resources are often used in the same context:
*
* * databricks.RegisteredModel to create [Models in Unity Catalog](https://docs.databricks.com/en/mlflow/models-in-uc.html) in Databricks.
* * End to end workspace management guide.
* * databricks.Directory to manage directories in [Databricks Workpace](https://docs.databricks.com/workspace/workspace-objects.html).
* * databricks.MlflowModel to create models in the [workspace model registry](https://docs.databricks.com/en/mlflow/model-registry.html) in Databricks.
* * databricks.Notebook to manage [Databricks Notebooks](https://docs.databricks.com/notebooks/index.html).
* * databricks.Notebook data to export a notebook from Databricks Workspace.
* * databricks.Repo to manage [Databricks Repos](https://docs.databricks.com/repos.html).
*
* ## Import
*
* The experiment resource can be imported using the id of the experiment
*
* bash
*
* ```sh
* $ pulumi import databricks:index/mlflowExperiment:MlflowExperiment this <experiment-id>
* ```
*/
class MlflowExperiment extends pulumi.CustomResource {
/**
* Get an existing MlflowExperiment 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 MlflowExperiment(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of MlflowExperiment. 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'] === MlflowExperiment.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["artifactLocation"] = state ? state.artifactLocation : undefined;
resourceInputs["creationTime"] = state ? state.creationTime : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["experimentId"] = state ? state.experimentId : undefined;
resourceInputs["lastUpdateTime"] = state ? state.lastUpdateTime : undefined;
resourceInputs["lifecycleStage"] = state ? state.lifecycleStage : undefined;
resourceInputs["name"] = state ? state.name : undefined;
}
else {
const args = argsOrState;
resourceInputs["artifactLocation"] = args ? args.artifactLocation : undefined;
resourceInputs["creationTime"] = args ? args.creationTime : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["experimentId"] = args ? args.experimentId : undefined;
resourceInputs["lastUpdateTime"] = args ? args.lastUpdateTime : undefined;
resourceInputs["lifecycleStage"] = args ? args.lifecycleStage : undefined;
resourceInputs["name"] = args ? args.name : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(MlflowExperiment.__pulumiType, name, resourceInputs, opts);
}
}
exports.MlflowExperiment = MlflowExperiment;
/** @internal */
MlflowExperiment.__pulumiType = 'databricks:index/mlflowExperiment:MlflowExperiment';
//# sourceMappingURL=mlflowExperiment.js.map
;