UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

129 lines 5.2 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.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. * * > This resource can only be used with a workspace-level provider! * * ## 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: "s3://bucket/my-experiment", * tags: [ * { * key: "key1", * value: "value1", * }, * { * key: "key2", * value: "value2", * }, * ], * }); * ``` * * ## 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: * * hcl * * import { * * to = databricks_mlflow_experiment.this * * id = "<experiment-id>" * * } * * Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command: * * 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, { ...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?.artifactLocation; resourceInputs["creationTime"] = state?.creationTime; resourceInputs["description"] = state?.description; resourceInputs["experimentId"] = state?.experimentId; resourceInputs["lastUpdateTime"] = state?.lastUpdateTime; resourceInputs["lifecycleStage"] = state?.lifecycleStage; resourceInputs["name"] = state?.name; resourceInputs["tags"] = state?.tags; } else { const args = argsOrState; resourceInputs["artifactLocation"] = args?.artifactLocation; resourceInputs["creationTime"] = args?.creationTime; resourceInputs["description"] = args?.description; resourceInputs["experimentId"] = args?.experimentId; resourceInputs["lastUpdateTime"] = args?.lastUpdateTime; resourceInputs["lifecycleStage"] = args?.lifecycleStage; resourceInputs["name"] = args?.name; resourceInputs["tags"] = args?.tags; } 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